KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > javax > swing > JComboBox

javax.swing
Class JComboBox

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JComboBox
All Implemented Interfaces:
ActionListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, ListDataListener
See Also:
Top Examples, Source Code, XMLEncoder, ComboBoxModel, DefaultComboBoxModel

protected String actionCommand
See Also:
getActionCommand(), setActionCommand(java.lang.String)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void actionPerformed(ActionEvent e)
See Also:
ActionListener
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void addActionListener(ActionListener l)
See Also:
setSelectedItem(java.lang.Object)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void addItem(Object anObject)
See Also:
MutableComboBoxModel
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void addItemListener(ItemListener aListener)
See Also:
setSelectedItem(java.lang.Object), ItemSelectable
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void addPopupMenuListener(PopupMenuListener l)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void configureEditor(ComboBoxEditor anEditor,
                            Object anItem)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void configurePropertiesFromAction(Action a)
See Also:
setAction(javax.swing.Action)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void contentsChanged(ListDataEvent e)
See Also:
ListDataListener
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected PropertyChangeListener createActionPropertyChangeListener(Action a)
See Also:
setAction(javax.swing.Action)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected JComboBox.KeySelectionManager createDefaultKeySelectionManager()
See Also:
setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected ComboBoxModel dataModel
See Also:
setModel(javax.swing.ComboBoxModel), getModel()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected ComboBoxEditor editor
See Also:
setEditor(javax.swing.ComboBoxEditor), getEditor()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void fireActionEvent()
See Also:
EventListenerList
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void fireItemStateChanged(ItemEvent e)
See Also:
EventListenerList
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void firePopupMenuCanceled()
See Also:
addPopupMenuListener(javax.swing.event.PopupMenuListener)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void firePopupMenuWillBecomeInvisible()
See Also:
addPopupMenuListener(javax.swing.event.PopupMenuListener)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void firePopupMenuWillBecomeVisible()
See Also:
addPopupMenuListener(javax.swing.event.PopupMenuListener)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public AccessibleContext getAccessibleContext()
See Also:
JComponent, Accessible
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Action getAction()
See Also:
setAction(javax.swing.Action)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getActionCommand()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public ActionListener[] getActionListeners()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public ComboBoxEditor getEditor()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object getItemAt(int index)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int getItemCount()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public ItemListener[] getItemListeners()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public JComboBox.KeySelectionManager getKeySelectionManager()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int getMaximumRowCount()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public ComboBoxModel getModel()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public PopupMenuListener[] getPopupMenuListeners()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object getPrototypeDisplayValue()
See Also:
setPrototypeDisplayValue(java.lang.Object)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public ListCellRenderer getRenderer()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int getSelectedIndex()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object getSelectedItem()
See Also:
setSelectedItem(java.lang.Object)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object[] getSelectedObjects()
See Also:
ItemSelectable
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public ComboBoxUI getUI()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getUIClassID()
See Also:
UIDefaults.getUI(javax.swing.JComponent), JComponent
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void hidePopup()
See Also:
setPopupVisible(boolean)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void insertItemAt(Object anObject,
                         int index)
See Also:
MutableComboBoxModel
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void installAncestorListener()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void intervalAdded(ListDataEvent e)
See Also:
ListDataListener
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void intervalRemoved(ListDataEvent e)
See Also:
ListDataListener
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected boolean isEditable
See Also:
setEditable(boolean)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean isEditable()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean isLightWeightPopupEnabled()
See Also:
setLightWeightPopupEnabled(boolean)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean isPopupVisible()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public JComboBox()
See Also:
DefaultComboBoxModel
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public JComboBox(Object[] items)
See Also:
DefaultComboBoxModel
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[89]Create the combo box, select item at index 4
By Anonymous on 2005/01/03 16:06:05  Rate
String [  ]  petStrings =  {  "Bird", "Cat", "Dog", "Rabbit", "Pig"  } ; 
  
  
 // Create the combo box, select item at index 4. 
 // Indices start at 0, so 4 specifies the pig. 
 JComboBox petList = new JComboBox ( petStrings ) ; 
 petList.setSelectedIndex ( 4 ) ; 
 ... 
 


public JComboBox(Vector<?> items)
See Also:
DefaultComboBoxModel
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public JComboBox(ComboBoxModel aModel)
See Also:
DefaultComboBoxModel
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected JComboBox.KeySelectionManager keySelectionManager
See Also:
getKeySelectionManager(), setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected boolean lightWeightPopupEnabled
See Also:
isLightWeightPopupEnabled(), setLightWeightPopupEnabled(boolean)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected int maximumRowCount
See Also:
setMaximumRowCount(int), getMaximumRowCount()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected String paramString()
See Also:
JComponent
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void processKeyEvent(KeyEvent e)
See Also:
Component.isShowing(), Component.enableEvents(long), Component.addKeyListener(java.awt.event.KeyListener), Component.dispatchEvent(java.awt.AWTEvent), Component.processEvent(java.awt.AWTEvent), DefaultKeyboardFocusManager, KeyboardFocusManager, KeyListener, JComponent
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removeActionListener(ActionListener l)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removeAllItems()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removeItem(Object anObject)
See Also:
MutableComboBoxModel
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removeItemAt(int anIndex)
See Also:
MutableComboBoxModel
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removeItemListener(ItemListener aListener)
See Also:
ItemEvent, ItemSelectable
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removePopupMenuListener(PopupMenuListener l)
See Also:
addPopupMenuListener(javax.swing.event.PopupMenuListener)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected ListCellRenderer renderer
See Also:
setRenderer(javax.swing.ListCellRenderer), getRenderer()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void selectedItemChanged()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected Object selectedItemReminder
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean selectWithKeyChar(char keyChar)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setAction(Action a)
See Also:
createActionPropertyChangeListener(javax.swing.Action), configurePropertiesFromAction(javax.swing.Action), getAction()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setActionCommand(String aCommand)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setEditable(boolean aFlag)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setEditor(ComboBoxEditor anEditor)
See Also:
setRenderer(javax.swing.ListCellRenderer)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setEnabled(boolean b)
See Also:
Component.isLightweight(), Component.isEnabled(), JComponent
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setKeySelectionManager(JComboBox.KeySelectionManager aManager)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setLightWeightPopupEnabled(boolean aFlag)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setMaximumRowCount(int count)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setModel(ComboBoxModel aModel)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setPopupVisible(boolean v)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setPrototypeDisplayValue(Object prototypeDisplayValue)
See Also:
getPrototypeDisplayValue()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setRenderer(ListCellRenderer aRenderer)
See Also:
setEditor(javax.swing.ComboBoxEditor)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setSelectedIndex(int anIndex)
See Also:
IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setSelectedItem(Object anObject)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setUI(ComboBoxUI ui)
See Also:
UIDefaults.getUI(javax.swing.JComponent)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void showPopup()
See Also:
setPopupVisible(boolean)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void updateUI()
See Also:
JComponent
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags