Package java.awt.peer |
![]() Previous |
![]() Java API |
![]() Index |
![]() Next |
The choice menu peer interface specifies the methods that all implementations of Abstract Window Toolkit choice menus must define.
public interface java.awt.peer.ChoicePeer extends java.awt.peer.ComponentPeer { // Methods public abstract void addItem(String item, int index); public abstract void select(int index); }
public abstract void addItem(String item, int index)Adds an item to the choice menu at the specified position.
Parameter Description item the string item index the position
public abstract void select(int index)Sets the selected item to be the item at the specified position.
Parameter Description index the selected item position