@Override
public void actionPerformed(final ActionEvent e) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
<BUG>final int result = JOptionPane.showOptionDialog(SwingUtilities.getWindowAncestor((Component) e.getSource()), subPanel, UI.BUNDLE.getString(titleKey), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null);
if (result == JOptionPane.OK_OPTION) {
subController.commit(list.getSelectedIndex());</BUG>
} else {
subController.rollback();

@Override
public void actionPerformed(final ActionEvent e) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
subController.switchToBlankModel();
final boolean result = validationPanel.showOkCancelDialog(UI.BUNDLE.getString(titleKey));
if (result) {
subController.addCurrentModel();
} else {
subController.rollback();
