final JTextArea textArea = new JTextArea(3, 10);
JScrollPane textPanel = new JScrollPane(textArea);
JButton printButton = new JButton("print");
printButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ListModel model = list.getModel();
int n = model.getSize();
for (int i = 0; i < n; i++) {
CheckableItem item = (CheckableItem) model.getElementAt(i);
if (item.isSelected()) {
textArea.append(item.toString());
textArea.append(System.getProperty("line.separator"));
}
}