setLayout(new BorderLayout());
list = new JList(label);
JButton button = new JButton("Print");
JScrollPane pane = new JScrollPane(list);
DefaultListSelectionModel m = new DefaultListSelectionModel();
m.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
m.setLeadAnchorNotificationEnabled(false);
list.setSelectionModel(m);
list.addListSelectionListener(this);
button.addActionListener(this);
add(pane, BorderLayout.NORTH);
add(button, BorderLayout.SOUTH);