JRootPane source = (JRootPane) event.getSource(); String propertyName = event.getPropertyName(); if (propertyName.equals("defaultButton")) { Object newValue = event.getNewValue(); InputMap im = SwingUtilities.getUIInputMap(source, JComponent.WHEN_IN_FOCUSED_WINDOW); if (newValue != null) { Object[] keybindings = (Object[]) UIManager.get ("RootPane.defaultButtonWindowKeyBindings"); LookAndFeel.loadKeyBindings(im, keybindings); } else { im.clear(); } }
  public void propertyChange(PropertyChangeEvent event)  {    // TODO: Implement this properly.  }