The Choice
class has a number of methods to add,
remove, and return different items from the list. The list starts
counting at 0.
public int getItemCount()
public String getItem(int index)
public void add(String item)
public void addItem(String item)
public void insert(String item, int position)
public void remove(String item)
public void remove(int position)
public void removeAll()
However, most of the item you'll just build the Choice
when the applet starts up, and not modify it later.
These methods get or set the current selected item in the
Choice
, that is the item that's shown.
public void removeAll()
public String getSelectedItem()
public Object[] getSelectedObjects()
public int getSelectedIndex()
public void select(int position)
public void select(String item)