diff options
Diffstat (limited to 'libjava/classpath/javax/swing/ButtonGroup.java')
-rw-r--r-- | libjava/classpath/javax/swing/ButtonGroup.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libjava/classpath/javax/swing/ButtonGroup.java b/libjava/classpath/javax/swing/ButtonGroup.java index efa36b5f641..6a474f98d28 100644 --- a/libjava/classpath/javax/swing/ButtonGroup.java +++ b/libjava/classpath/javax/swing/ButtonGroup.java @@ -68,7 +68,7 @@ public class ButtonGroup implements Serializable private static final long serialVersionUID = 4259076101881721375L; /** Stores references to the buttons added to this button group. */ - protected Vector buttons = new Vector(); + protected Vector<AbstractButton> buttons = new Vector<AbstractButton>(); /** The currently selected button model. */ ButtonModel sel; @@ -129,7 +129,7 @@ public class ButtonGroup implements Serializable * * @return <code>Enumeration</code> over all added buttons */ - public Enumeration getElements() + public Enumeration<AbstractButton> getElements() { return buttons.elements(); } @@ -183,6 +183,10 @@ public class ButtonGroup implements Serializable if (old != null) old.setSelected(false); + + if (m != null) + sel.setSelected(true); + AbstractButton button = findButton(old); if (button != null) button.repaint(); |