diff options
Diffstat (limited to 'javax/swing/JButton.java')
-rw-r--r-- | javax/swing/JButton.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/javax/swing/JButton.java b/javax/swing/JButton.java index 5653fbf42..ff0ecfccf 100644 --- a/javax/swing/JButton.java +++ b/javax/swing/JButton.java @@ -75,9 +75,6 @@ public class JButton extends AbstractButton boolean def; boolean is_def; - /** The AccessibleContext for this JButton. */ - AccessibleJButton accessibleContext; - public JButton() { this(null, null); @@ -166,6 +163,10 @@ public class JButton extends AbstractButton */ public void removeNotify() { + JRootPane root = SwingUtilities.getRootPane(this); + if (root != null && root.getDefaultButton() == this) + root.setDefaultButton(null); + super.removeNotify(); } public void setDefaultCapable(boolean defaultCapable) |