コード例 #1
0
  protected void installKeyboardActions() {
    InputMap map = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);

    SwingUtilities.replaceUIInputMap(optionPane, JComponent.WHEN_IN_FOCUSED_WINDOW, map);

    LazyActionMap.installLazyActionMap(optionPane, BasicOptionPaneUI.class, "OptionPane.actionMap");
  }
コード例 #2
0
 static void loadActionMap(LazyActionMap map) {
   map.put(new Actions(Actions.CLOSE));
   BasicLookAndFeel.installAudioActionMap(map);
 }