When the Action.SELECTED_KEY property action is assigned to ToggleButton and an 
accelerator key binding is mapped to the action, then pressing the accelerator 
key binding does not toggle the toggle button.
This is because SwingUtilities.notifyAction does not fire itemStateChanged 
event for such action related to SELECTED_KEY.
Fix is to get the Action.SELECTED_KEY command/action and fire itemStateChanged 
Event via JToggleButton.setSelected() call to notify propertyChange listener of 
the toggled property.

-------------

Commit messages:
 - JDK-6817009: Action.SELECTED_KEY not toggled when using key binding

Changes: https://git.openjdk.org/jdk/pull/12253/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12253&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-6817009
  Stats: 139 lines in 2 files changed: 139 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/12253.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12253/head:pull/12253

PR: https://git.openjdk.org/jdk/pull/12253

Reply via email to