< prev index next >
src/demo/share/jfc/SwingSet2/DirectionPanel.java
Print this page
@@ -90,13 +90,13 @@
public String getSelection() {
return group.getSelection().getActionCommand();
}
public void setSelection( String selection ) {
- Enumeration e = group.getElements();
+ Enumeration<AbstractButton> e = group.getElements();
while( e.hasMoreElements() ) {
- JRadioButton b = (JRadioButton)e.nextElement();
+ AbstractButton b = e.nextElement();
if( b.getActionCommand().equals(selection) ) {
b.setSelected(true);
}
}
}
@@ -145,14 +145,11 @@
setSelectedIcon(downIcon);
setActionCommand(direction);
getAccessibleContext().setAccessibleName(direction);
getAccessibleContext().setAccessibleDescription(description);
setSelected(selected);
- }
-
- public boolean isFocusTraversable() {
- return false;
+ setFocusable(false);
}
public void setBorder(Border b) {
}
}
< prev index next >