}
public void actionPerformed(ActionEvent e) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
final Device dev = UserFacade.getInstance().getSelectedDevice();
final JDialog dlg = new JDialog((Dialog) null, "create new partition", true);
final SpinnerNumberModel spn = new SpinnerNumberModel(10, 1, dev.getSize(), 10);
dlg.getContentPane().setLayout(new FlowLayout());
dlg.getContentPane().add(new JLabel("size : "));
dlg.getContentPane().add(new JSpinner(spn));
JButton btn = new JButton("Add partition");
btn.addActionListener(new ActionListener() {