ChoiceNameChoice
DescriptionThe Choice is a Component that provides a drop-down list of choices to choose from. Class Definition
public class java.awt.Choice extends java.awt.Component implements java.awt.ItemSelectable { // Constructors public Choice(); // Instance Methods public synchronized void add (String item); public synchronized void addItem (String item); public void addItemListener (ItemListener l); public void addNotify(); public int countItems(); public String getItem (int index); public int getItemCount(); public int getSelectedIndex(); public synchronized String getSelectedItem(); public synchronized Object[] getSelectedObjects(); public synchronized void insert (String item, int index); public synchronized void remove (int position); public synchronized void remove (String item); public synchronized void removeAll(); public void removeItemListener (ItemListener l); public synchronized void select (int pos); public synchronized void select (String str); // Protected Instance Methods protected String paramString(); protected void processEvent (AWTEvent e); protected void processItemEvent (ItemEvent e); } ConstructorsChoicepublic Choice()
Instance Methodsaddpublic synchronized void add (String item)
addItempublic synchronized void addItem (String item)
addItemListenerpublic void addItemListener (ItemListener l)
addNotifypublic void addNotify()
countItemspublic int countItems()
getItempublic String getItem (int index)
getItemCountpublic int getItemCount()
getSelectedIndexpublic int getSelectedIndex()
getSelectedItempublic synchronized String getSelectedItem()
getSelectedObjectspublic synchronized Object[] getSelectedObjects()
insertpublic synchronized void insert (String item, int index)
removepublic synchronized void remove (int position)
public synchronized void remove (String string)
removeAllpublic synchronized void removeAll()
removeItemListenerpublic void removeItemListener (ItemListener l)
selectpublic synchronized void select (int pos)
public synchronized void select (String str)
Protected Instance MethodsparamStringprotected String paramString()
processEventprotected void processEvent (AWTEvent e)
processItemEventprotected void processItemEvent (ItemEvent e)
See AlsoComponent, ItemSelectable, String |
|