import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
import java.util.Random;
-import java.util.Set;
import java.util.Vector;
import javax.swing.JCheckBoxMenuItem;
int confirm = JOptionPane.showConfirmDialog(this, prompt,
MessageManager.getString("label.close_viewer"),
JOptionPane.YES_NO_CANCEL_OPTION);
- if (confirm == JOptionPane.CANCEL_OPTION)
+ /*
+ * abort closure if user hits escape or Cancel
+ */
+ if (confirm == JOptionPane.CANCEL_OPTION
+ || confirm == JOptionPane.CLOSED_OPTION)
{
return;
}