diff options
author | Mark Wielaard <mark@klomp.org> | 2004-09-04 20:52:28 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2004-09-04 20:52:28 +0000 |
commit | 809e4a379b08cd20b021ef52c7378ad481762c39 (patch) | |
tree | f5cf6f3c42eb4fa657618a2c1486de234f4bd19a /javax/swing/DefaultButtonModel.java | |
parent | 21388732aa378c306ed7848ebacf120338a5dabf (diff) | |
download | classpath-809e4a379b08cd20b021ef52c7378ad481762c39.tar.gz |
2004-09-04 Graydon Hoare <graydon@redhat.com>
* javax/swing/DefaultButtonModel.java:
Skip group notification when no group is set.
2004-09-04 Graydon Hoare <graydon@redhat.com>
* javax/swing/JComponent.java
(resetKeyboardActions): Add null checks.
Diffstat (limited to 'javax/swing/DefaultButtonModel.java')
-rw-r--r-- | javax/swing/DefaultButtonModel.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/javax/swing/DefaultButtonModel.java b/javax/swing/DefaultButtonModel.java index d990442d6..31c14a0e8 100644 --- a/javax/swing/DefaultButtonModel.java +++ b/javax/swing/DefaultButtonModel.java @@ -339,14 +339,16 @@ public class DefaultButtonModel implements ButtonModel, Serializable { fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED, null, ItemEvent.SELECTED)); - group.setSelected(this, true); + if (group != null) + group.setSelected(this, true); } else if ((oldstate & SELECTED) == SELECTED && (newstate & SELECTED) == 0) { fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED, null, ItemEvent.DESELECTED)); - group.setSelected(this, false); + if (group != null) + group.setSelected(this, false); } else if (((oldstate & ARMED) == ARMED && (oldstate & PRESSED) == PRESSED) |