3 import java.awt.event.KeyAdapter;
4 import java.awt.event.KeyEvent;
6 import javax.swing.JDialog;
9 * Convenience class to close a dialog when the escape key is pressed
11 public class DialogCloser extends KeyAdapter
13 /** dialog to close */
14 private JDialog _dialog = null;
18 * @param inDialog dialog to close
20 public DialogCloser(JDialog inDialog) {
25 * React to the release of the escape key
27 public void keyReleased(KeyEvent e)
29 if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {