Skip to content
Snippets Groups Projects
Commit 58fe07b0 authored by Minh Hiep Pham's avatar Minh Hiep Pham :speech_balloon:
Browse files

change action map key

parent c0772335
No related branches found
No related tags found
1 merge request!117handled "esc" key for the Pragmas
......@@ -386,8 +386,8 @@ public class JDialogPerformancePragma extends JDialogBase implements ActionListe
}
});
helpPopup.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "closeJTextArea");
helpPopup.getActionMap().put("closeJTextArea", new AbstractAction() {
helpPopup.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "closeJlabel");
helpPopup.getActionMap().put("closeJlabel", new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
helpPopup.setVisible(false);
......
......@@ -366,14 +366,14 @@ public class JDialogSafetyPragma extends JDialogBase implements ActionListener {
}
});
helpPopup.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "closeJTextArea");
helpPopup.getActionMap().put("closeJTextArea", new AbstractAction() {
helpPopup.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "closeJlabel");
helpPopup.getActionMap().put("closeJlabel", new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
helpPopup.setVisible(false);
}
});
JPanel jp = new JPanel();
jp.add(cancel);
jp.add(close);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment