javax.swing
Class JComboBox

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.Component sample code for java.awt.Component definition code for java.awt.Component 
      extended by java.awt.Container sample code for java.awt.Container definition code for java.awt.Container 
          extended by javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent 
              extended by javax.swing.JComboBox
All Implemented Interfaces:
ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener , ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver , ItemSelectable sample code for java.awt.ItemSelectable definition code for java.awt.ItemSelectable , MenuContainer sample code for java.awt.MenuContainer definition code for java.awt.MenuContainer , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , EventListener sample code for java.util.EventListener definition code for java.util.EventListener , Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible , ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener

public class JComboBox
extends JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
implements ItemSelectable sample code for java.awt.ItemSelectable definition code for java.awt.ItemSelectable , ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener , ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener , Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible

A component that combines a button or editable field and a drop-down list. The user can select a value from the drop-down list, which appears at the user's request. If you make the combo box editable, then the combo box includes an editable field into which the user can type a value.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JComboBox key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See How to Use Combo Boxes in The Java Tutorial for further information.

See Also:
ComboBoxModel sample code for javax.swing.ComboBoxModel definition code for javax.swing.ComboBoxModel , DefaultComboBoxModel sample code for javax.swing.DefaultComboBoxModel definition code for javax.swing.DefaultComboBoxModel , Serialized Form

Nested Class Summary
protected  class JComboBox.AccessibleJComboBox sample code for javax.swing.JComboBox.AccessibleJComboBox definition code for javax.swing.JComboBox.AccessibleJComboBox
          This class implements accessibility support for the JComboBox class.
static interface JComboBox.KeySelectionManager sample code for javax.swing.JComboBox.KeySelectionManager definition code for javax.swing.JComboBox.KeySelectionManager
          The interface that defines a KeySelectionManager.
 
Nested classes/interfaces inherited from class javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
JComponent.AccessibleJComponent sample code for javax.swing.JComponent.AccessibleJComponent definition code for javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container sample code for java.awt.Container definition code for java.awt.Container
Container.AccessibleAWTContainer sample code for java.awt.Container.AccessibleAWTContainer definition code for java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
Component.AccessibleAWTComponent sample code for java.awt.Component.AccessibleAWTComponent definition code for java.awt.Component.AccessibleAWTComponent , Component.BltBufferStrategy sample code for java.awt.Component.BltBufferStrategy definition code for java.awt.Component.BltBufferStrategy , Component.FlipBufferStrategy sample code for java.awt.Component.FlipBufferStrategy definition code for java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  String sample code for java.lang.String definition code for java.lang.String actionCommand sample code for javax.swing.JComboBox.actionCommand definition code for javax.swing.JComboBox.actionCommand
          This protected field is implementation specific.
protected  ComboBoxModel sample code for javax.swing.ComboBoxModel definition code for javax.swing.ComboBoxModel dataModel sample code for javax.swing.JComboBox.dataModel definition code for javax.swing.JComboBox.dataModel
          This protected field is implementation specific.
protected  ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor editor sample code for javax.swing.JComboBox.editor definition code for javax.swing.JComboBox.editor
          This protected field is implementation specific.
protected  boolean isEditable sample code for javax.swing.JComboBox.isEditable definition code for javax.swing.JComboBox.isEditable
          This protected field is implementation specific.
protected  JComboBox.KeySelectionManager sample code for javax.swing.JComboBox.KeySelectionManager definition code for javax.swing.JComboBox.KeySelectionManager keySelectionManager sample code for javax.swing.JComboBox.keySelectionManager definition code for javax.swing.JComboBox.keySelectionManager
          This protected field is implementation specific.
protected  boolean lightWeightPopupEnabled sample code for javax.swing.JComboBox.lightWeightPopupEnabled definition code for javax.swing.JComboBox.lightWeightPopupEnabled
          This protected field is implementation specific.
protected  int maximumRowCount sample code for javax.swing.JComboBox.maximumRowCount definition code for javax.swing.JComboBox.maximumRowCount
          This protected field is implementation specific.
protected  ListCellRenderer sample code for javax.swing.ListCellRenderer definition code for javax.swing.ListCellRenderer renderer sample code for javax.swing.JComboBox.renderer definition code for javax.swing.JComboBox.renderer
          This protected field is implementation specific.
protected  Object sample code for java.lang.Object definition code for java.lang.Object selectedItemReminder sample code for javax.swing.JComboBox.selectedItemReminder definition code for javax.swing.JComboBox.selectedItemReminder
          This protected field is implementation specific.
 
Fields inherited from class javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
accessibleContext sample code for javax.swing.JComponent.accessibleContext definition code for javax.swing.JComponent.accessibleContext , listenerList sample code for javax.swing.JComponent.listenerList definition code for javax.swing.JComponent.listenerList , TOOL_TIP_TEXT_KEY sample code for javax.swing.JComponent.TOOL_TIP_TEXT_KEY definition code for javax.swing.JComponent.TOOL_TIP_TEXT_KEY , ui sample code for javax.swing.JComponent.ui definition code for javax.swing.JComponent.ui , UNDEFINED_CONDITION sample code for javax.swing.JComponent.UNDEFINED_CONDITION definition code for javax.swing.JComponent.UNDEFINED_CONDITION , WHEN_ANCESTOR_OF_FOCUSED_COMPONENT sample code for javax.swing.JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT definition code for javax.swing.JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT , WHEN_FOCUSED sample code for javax.swing.JComponent.WHEN_FOCUSED definition code for javax.swing.JComponent.WHEN_FOCUSED , WHEN_IN_FOCUSED_WINDOW sample code for javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW definition code for javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
BOTTOM_ALIGNMENT sample code for java.awt.Component.BOTTOM_ALIGNMENT definition code for java.awt.Component.BOTTOM_ALIGNMENT , CENTER_ALIGNMENT sample code for java.awt.Component.CENTER_ALIGNMENT definition code for java.awt.Component.CENTER_ALIGNMENT , LEFT_ALIGNMENT sample code for java.awt.Component.LEFT_ALIGNMENT definition code for java.awt.Component.LEFT_ALIGNMENT , RIGHT_ALIGNMENT sample code for java.awt.Component.RIGHT_ALIGNMENT definition code for java.awt.Component.RIGHT_ALIGNMENT , TOP_ALIGNMENT sample code for java.awt.Component.TOP_ALIGNMENT definition code for java.awt.Component.TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver
ABORT sample code for java.awt.image.ImageObserver.ABORT definition code for java.awt.image.ImageObserver.ABORT , ALLBITS sample code for java.awt.image.ImageObserver.ALLBITS definition code for java.awt.image.ImageObserver.ALLBITS , ERROR sample code for java.awt.image.ImageObserver.ERROR definition code for java.awt.image.ImageObserver.ERROR , FRAMEBITS sample code for java.awt.image.ImageObserver.FRAMEBITS definition code for java.awt.image.ImageObserver.FRAMEBITS , HEIGHT sample code for java.awt.image.ImageObserver.HEIGHT definition code for java.awt.image.ImageObserver.HEIGHT , PROPERTIES sample code for java.awt.image.ImageObserver.PROPERTIES definition code for java.awt.image.ImageObserver.PROPERTIES , SOMEBITS sample code for java.awt.image.ImageObserver.SOMEBITS definition code for java.awt.image.ImageObserver.SOMEBITS , WIDTH sample code for java.awt.image.ImageObserver.WIDTH definition code for java.awt.image.ImageObserver.WIDTH
 
Constructor Summary
JComboBox sample code for javax.swing.JComboBox.JComboBox() definition code for javax.swing.JComboBox.JComboBox() ()
          Creates a JComboBox with a default data model.
JComboBox sample code for javax.swing.JComboBox.JComboBox(javax.swing.ComboBoxModel) definition code for javax.swing.JComboBox.JComboBox(javax.swing.ComboBoxModel) (ComboBoxModel sample code for javax.swing.ComboBoxModel definition code for javax.swing.ComboBoxModel  aModel)
          Creates a JComboBox that takes it's items from an existing ComboBoxModel.
JComboBox sample code for javax.swing.JComboBox.JComboBox(java.lang.Object[]) definition code for javax.swing.JComboBox.JComboBox(java.lang.Object[]) (Object sample code for java.lang.Object definition code for java.lang.Object [] items)
          Creates a JComboBox that contains the elements in the specified array.
JComboBox sample code for javax.swing.JComboBox.JComboBox(java.util.Vector) definition code for javax.swing.JComboBox.JComboBox(java.util.Vector) (Vector sample code for java.util.Vector definition code for java.util.Vector <?> items)
          Creates a JComboBox that contains the elements in the specified Vector.
 
Method Summary
 void actionPerformed sample code for javax.swing.JComboBox.actionPerformed(java.awt.event.ActionEvent) definition code for javax.swing.JComboBox.actionPerformed(java.awt.event.ActionEvent) (ActionEvent sample code for java.awt.event.ActionEvent definition code for java.awt.event.ActionEvent  e)
          This method is public as an implementation side effect.
 void addActionListener sample code for javax.swing.JComboBox.addActionListener(java.awt.event.ActionListener) definition code for javax.swing.JComboBox.addActionListener(java.awt.event.ActionListener) (ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener  l)
          Adds an ActionListener.
 void addItem sample code for javax.swing.JComboBox.addItem(java.lang.Object) definition code for javax.swing.JComboBox.addItem(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  anObject)
          Adds an item to the item list.
 void addItemListener sample code for javax.swing.JComboBox.addItemListener(java.awt.event.ItemListener) definition code for javax.swing.JComboBox.addItemListener(java.awt.event.ItemListener) (ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.ItemListener  aListener)
          Adds an ItemListener.
 void addPopupMenuListener sample code for javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener) definition code for javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener) (PopupMenuListener sample code for javax.swing.event.PopupMenuListener definition code for javax.swing.event.PopupMenuListener  l)
          Adds a PopupMenu listener which will listen to notification messages from the popup portion of the combo box.
 void configureEditor sample code for javax.swing.JComboBox.configureEditor(javax.swing.ComboBoxEditor, java.lang.Object) definition code for javax.swing.JComboBox.configureEditor(javax.swing.ComboBoxEditor, java.lang.Object) (ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor  anEditor, Object sample code for java.lang.Object definition code for java.lang.Object  anItem)
          Initializes the editor with the specified item.
protected  void configurePropertiesFromAction sample code for javax.swing.JComboBox.configurePropertiesFromAction(javax.swing.Action) definition code for javax.swing.JComboBox.configurePropertiesFromAction(javax.swing.Action) (Action sample code for javax.swing.Action definition code for javax.swing.Action  a)
          Factory method which sets the ActionEvent source's properties according to values from the Action instance.
 void contentsChanged sample code for javax.swing.JComboBox.contentsChanged(javax.swing.event.ListDataEvent) definition code for javax.swing.JComboBox.contentsChanged(javax.swing.event.ListDataEvent) (ListDataEvent sample code for javax.swing.event.ListDataEvent definition code for javax.swing.event.ListDataEvent  e)
          This method is public as an implementation side effect.
protected  PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener createActionPropertyChangeListener sample code for javax.swing.JComboBox.createActionPropertyChangeListener(javax.swing.Action) definition code for javax.swing.JComboBox.createActionPropertyChangeListener(javax.swing.Action) (Action sample code for javax.swing.Action definition code for javax.swing.Action  a)
          Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected  JComboBox.KeySelectionManager sample code for javax.swing.JComboBox.KeySelectionManager definition code for javax.swing.JComboBox.KeySelectionManager createDefaultKeySelectionManager sample code for javax.swing.JComboBox.createDefaultKeySelectionManager() definition code for javax.swing.JComboBox.createDefaultKeySelectionManager() ()
          Returns an instance of the default key-selection manager.
protected  void fireActionEvent sample code for javax.swing.JComboBox.fireActionEvent() definition code for javax.swing.JComboBox.fireActionEvent() ()
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireItemStateChanged sample code for javax.swing.JComboBox.fireItemStateChanged(java.awt.event.ItemEvent) definition code for javax.swing.JComboBox.fireItemStateChanged(java.awt.event.ItemEvent) (ItemEvent sample code for java.awt.event.ItemEvent definition code for java.awt.event.ItemEvent  e)
          Notifies all listeners that have registered interest for notification on this event type.
 void firePopupMenuCanceled sample code for javax.swing.JComboBox.firePopupMenuCanceled() definition code for javax.swing.JComboBox.firePopupMenuCanceled() ()
          Notifies PopupMenuListeners that the popup portion of the combo box has been canceled.
 void firePopupMenuWillBecomeInvisible sample code for javax.swing.JComboBox.firePopupMenuWillBecomeInvisible() definition code for javax.swing.JComboBox.firePopupMenuWillBecomeInvisible() ()
          Notifies PopupMenuListeners that the popup portion of the combo box has become invisible.
 void firePopupMenuWillBecomeVisible sample code for javax.swing.JComboBox.firePopupMenuWillBecomeVisible() definition code for javax.swing.JComboBox.firePopupMenuWillBecomeVisible() ()
          Notifies PopupMenuListeners that the popup portion of the combo box will become visible.
 AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext getAccessibleContext sample code for javax.swing.JComboBox.getAccessibleContext() definition code for javax.swing.JComboBox.getAccessibleContext() ()
          Gets the AccessibleContext associated with this JComboBox.
 Action sample code for javax.swing.Action definition code for javax.swing.Action getAction sample code for javax.swing.JComboBox.getAction() definition code for javax.swing.JComboBox.getAction() ()
          Returns the currently set Action for this ActionEvent source, or null if no Action is set.
 String sample code for java.lang.String definition code for java.lang.String getActionCommand sample code for javax.swing.JComboBox.getActionCommand() definition code for javax.swing.JComboBox.getActionCommand() ()
          Returns the action command that is included in the event sent to action listeners.
 ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener [] getActionListeners sample code for javax.swing.JComboBox.getActionListeners() definition code for javax.swing.JComboBox.getActionListeners() ()
          Returns an array of all the ActionListeners added to this JComboBox with addActionListener().
 ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor getEditor sample code for javax.swing.JComboBox.getEditor() definition code for javax.swing.JComboBox.getEditor() ()
          Returns the editor used to paint and edit the selected item in the JComboBox field.
 Object sample code for java.lang.Object definition code for java.lang.Object getItemAt sample code for javax.swing.JComboBox.getItemAt(int) definition code for javax.swing.JComboBox.getItemAt(int) (int index)
          Returns the list item at the specified index.
 int getItemCount sample code for javax.swing.JComboBox.getItemCount() definition code for javax.swing.JComboBox.getItemCount() ()
          Returns the number of items in the list.
 ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.ItemListener [] getItemListeners sample code for javax.swing.JComboBox.getItemListeners() definition code for javax.swing.JComboBox.getItemListeners() ()
          Returns an array of all the ItemListeners added to this JComboBox with addItemListener().
 JComboBox.KeySelectionManager sample code for javax.swing.JComboBox.KeySelectionManager definition code for javax.swing.JComboBox.KeySelectionManager getKeySelectionManager sample code for javax.swing.JComboBox.getKeySelectionManager() definition code for javax.swing.JComboBox.getKeySelectionManager() ()
          Returns the list's key-selection manager.
 int getMaximumRowCount sample code for javax.swing.JComboBox.getMaximumRowCount() definition code for javax.swing.JComboBox.getMaximumRowCount() ()
          Returns the maximum number of items the combo box can display without a scrollbar
 ComboBoxModel sample code for javax.swing.ComboBoxModel definition code for javax.swing.ComboBoxModel getModel sample code for javax.swing.JComboBox.getModel() definition code for javax.swing.JComboBox.getModel() ()
          Returns the data model currently used by the JComboBox.
 PopupMenuListener sample code for javax.swing.event.PopupMenuListener definition code for javax.swing.event.PopupMenuListener [] getPopupMenuListeners sample code for javax.swing.JComboBox.getPopupMenuListeners() definition code for javax.swing.JComboBox.getPopupMenuListeners() ()
          Returns an array of all the PopupMenuListeners added to this JComboBox with addPopupMenuListener().
 Object sample code for java.lang.Object definition code for java.lang.Object getPrototypeDisplayValue sample code for javax.swing.JComboBox.getPrototypeDisplayValue() definition code for javax.swing.JComboBox.getPrototypeDisplayValue() ()
          Returns the "prototypical display" value - an Object used for the calculation of the display height and width.
 ListCellRenderer sample code for javax.swing.ListCellRenderer definition code for javax.swing.ListCellRenderer getRenderer sample code for javax.swing.JComboBox.getRenderer() definition code for javax.swing.JComboBox.getRenderer() ()
          Returns the renderer used to display the selected item in the JComboBox field.
 int getSelectedIndex sample code for javax.swing.JComboBox.getSelectedIndex() definition code for javax.swing.JComboBox.getSelectedIndex() ()
          Returns the first item in the list that matches the given item.
 Object sample code for java.lang.Object definition code for java.lang.Object getSelectedItem sample code for javax.swing.JComboBox.getSelectedItem() definition code for javax.swing.JComboBox.getSelectedItem() ()
          Returns the current selected item.
 Object sample code for java.lang.Object definition code for java.lang.Object [] getSelectedObjects sample code for javax.swing.JComboBox.getSelectedObjects() definition code for javax.swing.JComboBox.getSelectedObjects() ()
          Returns an array containing the selected item.
 ComboBoxUI sample code for javax.swing.plaf.ComboBoxUI definition code for javax.swing.plaf.ComboBoxUI getUI sample code for javax.swing.JComboBox.getUI() definition code for javax.swing.JComboBox.getUI() ()
          Returns the L&F object that renders this component.
 String sample code for java.lang.String definition code for java.lang.String getUIClassID sample code for javax.swing.JComboBox.getUIClassID() definition code for javax.swing.JComboBox.getUIClassID() ()
          Returns the name of the L&F class that renders this component.
 void hidePopup sample code for javax.swing.JComboBox.hidePopup() definition code for javax.swing.JComboBox.hidePopup() ()
          Causes the combo box to close its popup window.
 void insertItemAt sample code for javax.swing.JComboBox.insertItemAt(java.lang.Object, int) definition code for javax.swing.JComboBox.insertItemAt(java.lang.Object, int) (Object sample code for java.lang.Object definition code for java.lang.Object  anObject, int index)
          Inserts an item into the item list at a given index.
protected  void installAncestorListener sample code for javax.swing.JComboBox.installAncestorListener() definition code for javax.swing.JComboBox.installAncestorListener() ()
           
 void intervalAdded sample code for javax.swing.JComboBox.intervalAdded(javax.swing.event.ListDataEvent) definition code for javax.swing.JComboBox.intervalAdded(javax.swing.event.ListDataEvent) (ListDataEvent sample code for javax.swing.event.ListDataEvent definition code for javax.swing.event.ListDataEvent  e)
          This method is public as an implementation side effect.
 void intervalRemoved sample code for javax.swing.JComboBox.intervalRemoved(javax.swing.event.ListDataEvent) definition code for javax.swing.JComboBox.intervalRemoved(javax.swing.event.ListDataEvent) (ListDataEvent sample code for javax.swing.event.ListDataEvent definition code for javax.swing.event.ListDataEvent  e)
          This method is public as an implementation side effect.
 boolean isEditable sample code for javax.swing.JComboBox.isEditable() definition code for javax.swing.JComboBox.isEditable() ()
          Returns true if the JComboBox is editable.
 boolean isLightWeightPopupEnabled sample code for javax.swing.JComboBox.isLightWeightPopupEnabled() definition code for javax.swing.JComboBox.isLightWeightPopupEnabled() ()
          Gets the value of the lightWeightPopupEnabled property.
 boolean isPopupVisible sample code for javax.swing.JComboBox.isPopupVisible() definition code for javax.swing.JComboBox.isPopupVisible() ()
          Determines the visibility of the popup.
protected  String sample code for java.lang.String definition code for java.lang.String paramString sample code for javax.swing.JComboBox.paramString() definition code for javax.swing.JComboBox.paramString() ()
          Returns a string representation of this JComboBox.
 void processKeyEvent sample code for javax.swing.JComboBox.processKeyEvent(java.awt.event.KeyEvent) definition code for javax.swing.JComboBox.processKeyEvent(java.awt.event.KeyEvent) (KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent  e)
          Handles KeyEvents, looking for the Tab key.
 void removeActionListener sample code for javax.swing.JComboBox.removeActionListener(java.awt.event.ActionListener) definition code for javax.swing.JComboBox.removeActionListener(java.awt.event.ActionListener) (ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener  l)
          Removes an ActionListener.
 void removeAllItems sample code for javax.swing.JComboBox.removeAllItems() definition code for javax.swing.JComboBox.removeAllItems() ()
          Removes all items from the item list.
 void removeItem sample code for javax.swing.JComboBox.removeItem(java.lang.Object) definition code for javax.swing.JComboBox.removeItem(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  anObject)
          Removes an item from the item list.
 void removeItemAt sample code for javax.swing.JComboBox.removeItemAt(int) definition code for javax.swing.JComboBox.removeItemAt(int) (int anIndex)
          Removes the item at anIndex This method works only if the JComboBox uses a mutable data model.
 void removeItemListener sample code for javax.swing.JComboBox.removeItemListener(java.awt.event.ItemListener) definition code for javax.swing.JComboBox.removeItemListener(java.awt.event.ItemListener) (ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.ItemListener  aListener)
          Removes an ItemListener.
 void removePopupMenuListener sample code for javax.swing.JComboBox.removePopupMenuListener(javax.swing.event.PopupMenuListener) definition code for javax.swing.JComboBox.removePopupMenuListener(javax.swing.event.PopupMenuListener) (PopupMenuListener sample code for javax.swing.event.PopupMenuListener definition code for javax.swing.event.PopupMenuListener  l)
          Removes a PopupMenuListener.
protected  void selectedItemChanged sample code for javax.swing.JComboBox.selectedItemChanged() definition code for javax.swing.JComboBox.selectedItemChanged() ()
          This protected method is implementation specific.
 boolean selectWithKeyChar sample code for javax.swing.JComboBox.selectWithKeyChar(char) definition code for javax.swing.JComboBox.selectWithKeyChar(char) (char keyChar)
          Selects the list item that corresponds to the specified keyboard character and returns true, if there is an item corresponding to that character.
 void setAction sample code for javax.swing.JComboBox.setAction(javax.swing.Action) definition code for javax.swing.JComboBox.setAction(javax.swing.Action) (Action sample code for javax.swing.Action definition code for javax.swing.Action  a)
          Sets the Action for the ActionEvent source.
 void setActionCommand sample code for javax.swing.JComboBox.setActionCommand(java.lang.String) definition code for javax.swing.JComboBox.setActionCommand(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  aCommand)
          Sets the action command that should be included in the event sent to action listeners.
 void setEditable sample code for javax.swing.JComboBox.setEditable(boolean) definition code for javax.swing.JComboBox.setEditable(boolean) (boolean aFlag)
          Determines whether the JComboBox field is editable.
 void setEditor sample code for javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor) definition code for javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor) (ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor  anEditor)
          Sets the editor used to paint and edit the selected item in the JComboBox field.
 void setEnabled sample code for javax.swing.JComboBox.setEnabled(boolean) definition code for javax.swing.JComboBox.setEnabled(boolean) (boolean b)
          Enables the combo box so that items can be selected.
 void setKeySelectionManager sample code for javax.swing.JComboBox.setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager) definition code for javax.swing.JComboBox.setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager) (JComboBox.KeySelectionManager sample code for javax.swing.JComboBox.KeySelectionManager definition code for javax.swing.JComboBox.KeySelectionManager  aManager)
          Sets the object that translates a keyboard character into a list selection.
 void setLightWeightPopupEnabled sample code for javax.swing.JComboBox.setLightWeightPopupEnabled(boolean) definition code for javax.swing.JComboBox.setLightWeightPopupEnabled(boolean) (boolean aFlag)
          Sets the lightWeightPopupEnabled property, which provides a hint as to whether or not a lightweight Component should be used to contain the JComboBox, versus a heavyweight Component such as a Panel or a Window.
 void setMaximumRowCount sample code for javax.swing.JComboBox.setMaximumRowCount(int) definition code for javax.swing.JComboBox.setMaximumRowCount(int) (int count)
          Sets the maximum number of rows the JComboBox displays.
 void setModel sample code for javax.swing.JComboBox.setModel(javax.swing.ComboBoxModel) definition code for javax.swing.JComboBox.setModel(javax.swing.ComboBoxModel) (ComboBoxModel sample code for javax.swing.ComboBoxModel definition code for javax.swing.ComboBoxModel  aModel)
          Sets the data model that the JComboBox uses to obtain the list of items.
 void setPopupVisible sample code for javax.swing.JComboBox.setPopupVisible(boolean) definition code for javax.swing.JComboBox.setPopupVisible(boolean) (boolean v)
          Sets the visibility of the popup.
 void setPrototypeDisplayValue sample code for javax.swing.JComboBox.setPrototypeDisplayValue(java.lang.Object) definition code for javax.swing.JComboBox.setPrototypeDisplayValue(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  prototypeDisplayValue)
          Sets the prototype display value used to calculate the size of the display for the UI portion.
 void setRenderer sample code for javax.swing.JComboBox.setRenderer(javax.swing.ListCellRenderer) definition code for javax.swing.JComboBox.setRenderer(javax.swing.ListCellRenderer) (ListCellRenderer sample code for javax.swing.ListCellRenderer definition code for javax.swing.ListCellRenderer  aRenderer)
          Sets the renderer that paints the list items and the item selected from the list in the JComboBox field.
 void setSelectedIndex sample code for javax.swing.JComboBox.setSelectedIndex(int) definition code for javax.swing.JComboBox.setSelectedIndex(int) (int anIndex)
          Selects the item at index anIndex.
 void setSelectedItem sample code for javax.swing.JComboBox.setSelectedItem(java.lang.Object) definition code for javax.swing.JComboBox.setSelectedItem(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  anObject)
          Sets the selected item in the combo box display area to the object in the argument.
 void setUI sample code for javax.swing.JComboBox.setUI(javax.swing.plaf.ComboBoxUI) definition code for javax.swing.JComboBox.setUI(javax.swing.plaf.ComboBoxUI) (ComboBoxUI sample code for javax.swing.plaf.ComboBoxUI definition code for javax.swing.plaf.ComboBoxUI  ui)
          Sets the L&F object that renders this component.
 void showPopup sample code for javax.swing.JComboBox.showPopup() definition code for javax.swing.JComboBox.showPopup() ()
          Causes the combo box to display its popup window.
 void updateUI sample code for javax.swing.JComboBox.updateUI() definition code for javax.swing.JComboBox.updateUI() ()
          Resets the UI property to a value from the current look and feel.
 
Methods inherited from class javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
addAncestorListener sample code for javax.swing.JComponent.addAncestorListener(javax.swing.event.AncestorListener) definition code for javax.swing.JComponent.addAncestorListener(javax.swing.event.AncestorListener) , addNotify sample code for javax.swing.JComponent.addNotify() definition code for javax.swing.JComponent.addNotify() , addVetoableChangeListener sample code for javax.swing.JComponent.addVetoableChangeListener(java.beans.VetoableChangeListener) definition code for javax.swing.JComponent.addVetoableChangeListener(java.beans.VetoableChangeListener) , computeVisibleRect sample code for javax.swing.JComponent.computeVisibleRect(java.awt.Rectangle) definition code for javax.swing.JComponent.computeVisibleRect(java.awt.Rectangle) , contains sample code for javax.swing.JComponent.contains(int, int) definition code for javax.swing.JComponent.contains(int, int) , createToolTip sample code for javax.swing.JComponent.createToolTip() definition code for javax.swing.JComponent.createToolTip() , disable sample code for javax.swing.JComponent.disable() definition code for javax.swing.JComponent.disable() , enable sample code for javax.swing.JComponent.enable() definition code for javax.swing.JComponent.enable() , firePropertyChange sample code for javax.swing.JComponent.firePropertyChange(java.lang.String, boolean, boolean) definition code for javax.swing.JComponent.firePropertyChange(java.lang.String, boolean, boolean) , firePropertyChange sample code for javax.swing.JComponent.firePropertyChange(java.lang.String, char, char) definition code for javax.swing.JComponent.firePropertyChange(java.lang.String, char, char) , firePropertyChange sample code for javax.swing.JComponent.firePropertyChange(java.lang.String, int, int) definition code for javax.swing.JComponent.firePropertyChange(java.lang.String, int, int) , fireVetoableChange sample code for javax.swing.JComponent.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for javax.swing.JComponent.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object) , getActionForKeyStroke sample code for javax.swing.JComponent.getActionForKeyStroke(javax.swing.KeyStroke) definition code for javax.swing.JComponent.getActionForKeyStroke(javax.swing.KeyStroke) , getActionMap sample code for javax.swing.JComponent.getActionMap() definition code for javax.swing.JComponent.getActionMap() , getAlignmentX sample code for javax.swing.JComponent.getAlignmentX() definition code for javax.swing.JComponent.getAlignmentX() , getAlignmentY sample code for javax.swing.JComponent.getAlignmentY() definition code for javax.swing.JComponent.getAlignmentY() , getAncestorListeners sample code for javax.swing.JComponent.getAncestorListeners() definition code for javax.swing.JComponent.getAncestorListeners() , getAutoscrolls sample code for javax.swing.JComponent.getAutoscrolls() definition code for javax.swing.JComponent.getAutoscrolls() , getBorder sample code for javax.swing.JComponent.getBorder() definition code for javax.swing.JComponent.getBorder() , getBounds sample code for javax.swing.JComponent.getBounds(java.awt.Rectangle) definition code for javax.swing.JComponent.getBounds(java.awt.Rectangle) , getClientProperty sample code for javax.swing.JComponent.getClientProperty(java.lang.Object) definition code for javax.swing.JComponent.getClientProperty(java.lang.Object) , getComponentGraphics sample code for javax.swing.JComponent.getComponentGraphics(java.awt.Graphics) definition code for javax.swing.JComponent.getComponentGraphics(java.awt.Graphics) , getComponentPopupMenu sample code for javax.swing.JComponent.getComponentPopupMenu() definition code for javax.swing.JComponent.getComponentPopupMenu() , getConditionForKeyStroke sample code for javax.swing.JComponent.getConditionForKeyStroke(javax.swing.KeyStroke) definition code for javax.swing.JComponent.getConditionForKeyStroke(javax.swing.KeyStroke) , getDebugGraphicsOptions sample code for javax.swing.JComponent.getDebugGraphicsOptions() definition code for javax.swing.JComponent.getDebugGraphicsOptions() , getDefaultLocale sample code for javax.swing.JComponent.getDefaultLocale() definition code for javax.swing.JComponent.getDefaultLocale() , getFontMetrics sample code for javax.swing.JComponent.getFontMetrics(java.awt.Font) definition code for javax.swing.JComponent.getFontMetrics(java.awt.Font) , getGraphics sample code for javax.swing.JComponent.getGraphics() definition code for javax.swing.JComponent.getGraphics() , getHeight sample code for javax.swing.JComponent.getHeight() definition code for javax.swing.JComponent.getHeight() , getInheritsPopupMenu sample code for javax.swing.JComponent.getInheritsPopupMenu() definition code for javax.swing.JComponent.getInheritsPopupMenu() , getInputMap sample code for javax.swing.JComponent.getInputMap() definition code for javax.swing.JComponent.getInputMap() , getInputMap sample code for javax.swing.JComponent.getInputMap(int) definition code for javax.swing.JComponent.getInputMap(int) , getInputVerifier sample code for javax.swing.JComponent.getInputVerifier() definition code for javax.swing.JComponent.getInputVerifier() , getInsets sample code for javax.swing.JComponent.getInsets() definition code for javax.swing.JComponent.getInsets() , getInsets sample code for javax.swing.JComponent.getInsets(java.awt.Insets) definition code for javax.swing.JComponent.getInsets(java.awt.Insets) , getListeners sample code for javax.swing.JComponent.getListeners(java.lang.Class) definition code for javax.swing.JComponent.getListeners(java.lang.Class) , getLocation sample code for javax.swing.JComponent.getLocation(java.awt.Point) definition code for javax.swing.JComponent.getLocation(java.awt.Point) , getMaximumSize sample code for javax.swing.JComponent.getMaximumSize() definition code for javax.swing.JComponent.getMaximumSize() , getMinimumSize sample code for javax.swing.JComponent.getMinimumSize() definition code for javax.swing.JComponent.getMinimumSize() , getNextFocusableComponent sample code for javax.swing.JComponent.getNextFocusableComponent() definition code for javax.swing.JComponent.getNextFocusableComponent() , getPopupLocation sample code for javax.swing.JComponent.getPopupLocation(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.getPopupLocation(java.awt.event.MouseEvent) , getPreferredSize sample code for javax.swing.JComponent.getPreferredSize() definition code for javax.swing.JComponent.getPreferredSize() , getRegisteredKeyStrokes sample code for javax.swing.JComponent.getRegisteredKeyStrokes() definition code for javax.swing.JComponent.getRegisteredKeyStrokes() , getRootPane sample code for javax.swing.JComponent.getRootPane() definition code for javax.swing.JComponent.getRootPane() , getSize sample code for javax.swing.JComponent.getSize(java.awt.Dimension) definition code for javax.swing.JComponent.getSize(java.awt.Dimension) , getToolTipLocation sample code for javax.swing.JComponent.getToolTipLocation(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.getToolTipLocation(java.awt.event.MouseEvent) , getToolTipText sample code for javax.swing.JComponent.getToolTipText() definition code for javax.swing.JComponent.getToolTipText() , getToolTipText sample code for javax.swing.JComponent.getToolTipText(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.getToolTipText(java.awt.event.MouseEvent) , getTopLevelAncestor sample code for javax.swing.JComponent.getTopLevelAncestor() definition code for javax.swing.JComponent.getTopLevelAncestor() , getTransferHandler sample code for javax.swing.JComponent.getTransferHandler() definition code for javax.swing.JComponent.getTransferHandler() , getVerifyInputWhenFocusTarget sample code for javax.swing.JComponent.getVerifyInputWhenFocusTarget() definition code for javax.swing.JComponent.getVerifyInputWhenFocusTarget() , getVetoableChangeListeners sample code for javax.swing.JComponent.getVetoableChangeListeners() definition code for javax.swing.JComponent.getVetoableChangeListeners() , getVisibleRect sample code for javax.swing.JComponent.getVisibleRect() definition code for javax.swing.JComponent.getVisibleRect() , getWidth sample code for javax.swing.JComponent.getWidth() definition code for javax.swing.JComponent.getWidth() , getX sample code for javax.swing.JComponent.getX() definition code for javax.swing.JComponent.getX() , getY sample code for javax.swing.JComponent.getY() definition code for javax.swing.JComponent.getY() , grabFocus sample code for javax.swing.JComponent.grabFocus() definition code for javax.swing.JComponent.grabFocus() , isDoubleBuffered sample code for javax.swing.JComponent.isDoubleBuffered() definition code for javax.swing.JComponent.isDoubleBuffered() , isLightweightComponent sample code for javax.swing.JComponent.isLightweightComponent(java.awt.Component) definition code for javax.swing.JComponent.isLightweightComponent(java.awt.Component) , isManagingFocus sample code for javax.swing.JComponent.isManagingFocus() definition code for javax.swing.JComponent.isManagingFocus() , isOpaque sample code for javax.swing.JComponent.isOpaque() definition code for javax.swing.JComponent.isOpaque() , isOptimizedDrawingEnabled sample code for javax.swing.JComponent.isOptimizedDrawingEnabled() definition code for javax.swing.JComponent.isOptimizedDrawingEnabled() , isPaintingTile sample code for javax.swing.JComponent.isPaintingTile() definition code for javax.swing.JComponent.isPaintingTile() , isRequestFocusEnabled sample code for javax.swing.JComponent.isRequestFocusEnabled() definition code for javax.swing.JComponent.isRequestFocusEnabled() , isValidateRoot sample code for javax.swing.JComponent.isValidateRoot() definition code for javax.swing.JComponent.isValidateRoot() , paint sample code for javax.swing.JComponent.paint(java.awt.Graphics) definition code for javax.swing.JComponent.paint(java.awt.Graphics) , paintBorder sample code for javax.swing.JComponent.paintBorder(java.awt.Graphics) definition code for javax.swing.JComponent.paintBorder(java.awt.Graphics) , paintChildren sample code for javax.swing.JComponent.paintChildren(java.awt.Graphics) definition code for javax.swing.JComponent.paintChildren(java.awt.Graphics) , paintComponent sample code for javax.swing.JComponent.paintComponent(java.awt.Graphics) definition code for javax.swing.JComponent.paintComponent(java.awt.Graphics) , paintImmediately sample code for javax.swing.JComponent.paintImmediately(int, int, int, int) definition code for javax.swing.JComponent.paintImmediately(int, int, int, int) , paintImmediately sample code for javax.swing.JComponent.paintImmediately(java.awt.Rectangle) definition code for javax.swing.JComponent.paintImmediately(java.awt.Rectangle) , print sample code for javax.swing.JComponent.print(java.awt.Graphics) definition code for javax.swing.JComponent.print(java.awt.Graphics) , printAll sample code for javax.swing.JComponent.printAll(java.awt.Graphics) definition code for javax.swing.JComponent.printAll(java.awt.Graphics) , printBorder sample code for javax.swing.JComponent.printBorder(java.awt.Graphics) definition code for javax.swing.JComponent.printBorder(java.awt.Graphics) , printChildren sample code for javax.swing.JComponent.printChildren(java.awt.Graphics) definition code for javax.swing.JComponent.printChildren(java.awt.Graphics) , printComponent sample code for javax.swing.JComponent.printComponent(java.awt.Graphics) definition code for javax.swing.JComponent.printComponent(java.awt.Graphics) , processComponentKeyEvent sample code for javax.swing.JComponent.processComponentKeyEvent(java.awt.event.KeyEvent) definition code for javax.swing.JComponent.processComponentKeyEvent(java.awt.event.KeyEvent) , processKeyBinding sample code for javax.swing.JComponent.processKeyBinding(javax.swing.KeyStroke, java.awt.event.KeyEvent, int, boolean) definition code for javax.swing.JComponent.processKeyBinding(javax.swing.KeyStroke, java.awt.event.KeyEvent, int, boolean) , processMouseEvent sample code for javax.swing.JComponent.processMouseEvent(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.processMouseEvent(java.awt.event.MouseEvent) , processMouseMotionEvent sample code for javax.swing.JComponent.processMouseMotionEvent(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.processMouseMotionEvent(java.awt.event.MouseEvent) , putClientProperty sample code for javax.swing.JComponent.putClientProperty(java.lang.Object, java.lang.Object) definition code for javax.swing.JComponent.putClientProperty(java.lang.Object, java.lang.Object) , registerKeyboardAction sample code for javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, javax.swing.KeyStroke, int) definition code for javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, javax.swing.KeyStroke, int) , registerKeyboardAction sample code for javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int) definition code for javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int) , removeAncestorListener sample code for javax.swing.JComponent.removeAncestorListener(javax.swing.event.AncestorListener) definition code for javax.swing.JComponent.removeAncestorListener(javax.swing.event.AncestorListener) , removeNotify sample code for javax.swing.JComponent.removeNotify() definition code for javax.swing.JComponent.removeNotify() , removeVetoableChangeListener sample code for javax.swing.JComponent.removeVetoableChangeListener(java.beans.VetoableChangeListener) definition code for javax.swing.JComponent.removeVetoableChangeListener(java.beans.VetoableChangeListener) , repaint sample code for javax.swing.JComponent.repaint(long, int, int, int, int) definition code for javax.swing.JComponent.repaint(long, int, int, int, int) , repaint sample code for javax.swing.JComponent.repaint(java.awt.Rectangle) definition code for javax.swing.JComponent.repaint(java.awt.Rectangle) , requestDefaultFocus sample code for javax.swing.JComponent.requestDefaultFocus() definition code for javax.swing.JComponent.requestDefaultFocus() , requestFocus sample code for javax.swing.JComponent.requestFocus() definition code for javax.swing.JComponent.requestFocus() , requestFocus sample code for javax.swing.JComponent.requestFocus(boolean) definition code for javax.swing.JComponent.requestFocus(boolean) , requestFocusInWindow sample code for javax.swing.JComponent.requestFocusInWindow() definition code for javax.swing.JComponent.requestFocusInWindow() , requestFocusInWindow sample code for javax.swing.JComponent.requestFocusInWindow(boolean) definition code for javax.swing.JComponent.requestFocusInWindow(boolean) , resetKeyboardActions sample code for javax.swing.JComponent.resetKeyboardActions() definition code for javax.swing.JComponent.resetKeyboardActions() , reshape sample code for javax.swing.JComponent.reshape(int, int, int, int) definition code for javax.swing.JComponent.reshape(int, int, int, int) , revalidate sample code for javax.swing.JComponent.revalidate() definition code for javax.swing.JComponent.revalidate() , scrollRectToVisible sample code for javax.swing.JComponent.scrollRectToVisible(java.awt.Rectangle) definition code for javax.swing.JComponent.scrollRectToVisible(java.awt.Rectangle) , setActionMap sample code for javax.swing.JComponent.setActionMap(javax.swing.ActionMap) definition code for javax.swing.JComponent.setActionMap(javax.swing.ActionMap) , setAlignmentX sample code for javax.swing.JComponent.setAlignmentX(float) definition code for javax.swing.JComponent.setAlignmentX(float) , setAlignmentY sample code for javax.swing.JComponent.setAlignmentY(float) definition code for javax.swing.JComponent.setAlignmentY(float) , setAutoscrolls sample code for javax.swing.JComponent.setAutoscrolls(boolean) definition code for javax.swing.JComponent.setAutoscrolls(boolean) , setBackground sample code for javax.swing.JComponent.setBackground(java.awt.Color) definition code for javax.swing.JComponent.setBackground(java.awt.Color) , setBorder sample code for javax.swing.JComponent.setBorder(javax.swing.border.Border) definition code for javax.swing.JComponent.setBorder(javax.swing.border.Border) , setComponentPopupMenu sample code for javax.swing.JComponent.setComponentPopupMenu(javax.swing.JPopupMenu) definition code for javax.swing.JComponent.setComponentPopupMenu(javax.swing.JPopupMenu) , setDebugGraphicsOptions sample code for javax.swing.JComponent.setDebugGraphicsOptions(int) definition code for javax.swing.JComponent.setDebugGraphicsOptions(int) , setDefaultLocale sample code for javax.swing.JComponent.setDefaultLocale(java.util.Locale) definition code for javax.swing.JComponent.setDefaultLocale(java.util.Locale) , setDoubleBuffered sample code for javax.swing.JComponent.setDoubleBuffered(boolean) definition code for javax.swing.JComponent.setDoubleBuffered(boolean) , setFocusTraversalKeys sample code for javax.swing.JComponent.setFocusTraversalKeys(int, java.util.Set) definition code for javax.swing.JComponent.setFocusTraversalKeys(int, java.util.Set) , setFont sample code for javax.swing.JComponent.setFont(java.awt.Font) definition code for javax.swing.JComponent.setFont(java.awt.Font) , setForeground sample code for javax.swing.JComponent.setForeground(java.awt.Color) definition code for javax.swing.JComponent.setForeground(java.awt.Color) , setInheritsPopupMenu sample code for javax.swing.JComponent.setInheritsPopupMenu(boolean) definition code for javax.swing.JComponent.setInheritsPopupMenu(boolean) , setInputMap sample code for javax.swing.JComponent.setInputMap(int, javax.swing.InputMap) definition code for javax.swing.JComponent.setInputMap(int, javax.swing.InputMap) , setInputVerifier sample code for javax.swing.JComponent.setInputVerifier(javax.swing.InputVerifier) definition code for javax.swing.JComponent.setInputVerifier(javax.swing.InputVerifier) , setMaximumSize sample code for javax.swing.JComponent.setMaximumSize(java.awt.Dimension) definition code for javax.swing.JComponent.setMaximumSize(java.awt.Dimension) , setMinimumSize sample code for javax.swing.JComponent.setMinimumSize(java.awt.Dimension) definition code for javax.swing.JComponent.setMinimumSize(java.awt.Dimension) , setNextFocusableComponent sample code for javax.swing.JComponent.setNextFocusableComponent(java.awt.Component) definition code for javax.swing.JComponent.setNextFocusableComponent(java.awt.Component) , setOpaque sample code for javax.swing.JComponent.setOpaque(boolean) definition code for javax.swing.JComponent.setOpaque(boolean) , setPreferredSize sample code for javax.swing.JComponent.setPreferredSize(java.awt.Dimension) definition code for javax.swing.JComponent.setPreferredSize(java.awt.Dimension) , setRequestFocusEnabled sample code for javax.swing.JComponent.setRequestFocusEnabled(boolean) definition code for javax.swing.JComponent.setRequestFocusEnabled(boolean) , setToolTipText sample code for javax.swing.JComponent.setToolTipText(java.lang.String) definition code for javax.swing.JComponent.setToolTipText(java.lang.String) , setTransferHandler sample code for javax.swing.JComponent.setTransferHandler(javax.swing.TransferHandler) definition code for javax.swing.JComponent.setTransferHandler(javax.swing.TransferHandler) , setUI sample code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) definition code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) , setVerifyInputWhenFocusTarget sample code for javax.swing.JComponent.setVerifyInputWhenFocusTarget(boolean) definition code for javax.swing.JComponent.setVerifyInputWhenFocusTarget(boolean) , setVisible sample code for javax.swing.JComponent.setVisible(boolean) definition code for javax.swing.JComponent.setVisible(boolean) , unregisterKeyboardAction sample code for javax.swing.JComponent.unregisterKeyboardAction(javax.swing.KeyStroke) definition code for javax.swing.JComponent.unregisterKeyboardAction(javax.swing.KeyStroke) , update sample code for javax.swing.JComponent.update(java.awt.Graphics) definition code for javax.swing.JComponent.update(java.awt.Graphics)
 
Methods inherited from class java.awt.Container sample code for java.awt.Container definition code for java.awt.Container
add sample code for java.awt.Container.add(java.awt.Component) definition code for java.awt.Container.add(java.awt.Component) , add sample code for java.awt.Container.add(java.awt.Component, int) definition code for java.awt.Container.add(java.awt.Component, int) , add sample code for java.awt.Container.add(java.awt.Component, java.lang.Object) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object) , add sample code for java.awt.Container.add(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object, int) , add sample code for java.awt.Container.add(java.lang.String, java.awt.Component) definition code for java.awt.Container.add(java.lang.String, java.awt.Component) , addContainerListener sample code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) , addImpl sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) , addPropertyChangeListener sample code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) , addPropertyChangeListener sample code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , applyComponentOrientation sample code for java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation) , areFocusTraversalKeysSet sample code for java.awt.Container.areFocusTraversalKeysSet(int) definition code for java.awt.Container.areFocusTraversalKeysSet(int) , countComponents sample code for java.awt.Container.countComponents() definition code for java.awt.Container.countComponents() , deliverEvent sample code for java.awt.Container.deliverEvent(java.awt.Event) definition code for java.awt.Container.deliverEvent(java.awt.Event) , doLayout sample code for java.awt.Container.doLayout() definition code for java.awt.Container.doLayout() , findComponentAt sample code for java.awt.Container.findComponentAt(int, int) definition code for java.awt.Container.findComponentAt(int, int) , findComponentAt sample code for java.awt.Container.findComponentAt(java.awt.Point) definition code for java.awt.Container.findComponentAt(java.awt.Point) , getComponent sample code for java.awt.Container.getComponent(int) definition code for java.awt.Container.getComponent(int) , getComponentAt sample code for java.awt.Container.getComponentAt(int, int) definition code for java.awt.Container.getComponentAt(int, int) , getComponentAt sample code for java.awt.Container.getComponentAt(java.awt.Point) definition code for java.awt.Container.getComponentAt(java.awt.Point) , getComponentCount sample code for java.awt.Container.getComponentCount() definition code for java.awt.Container.getComponentCount() , getComponents sample code for java.awt.Container.getComponents() definition code for java.awt.Container.getComponents() , getComponentZOrder sample code for java.awt.Container.getComponentZOrder(java.awt.Component) definition code for java.awt.Container.getComponentZOrder(java.awt.Component) , getContainerListeners sample code for java.awt.Container.getContainerListeners() definition code for java.awt.Container.getContainerListeners() , getFocusTraversalKeys sample code for java.awt.Container.getFocusTraversalKeys(int) definition code for java.awt.Container.getFocusTraversalKeys(int) , getFocusTraversalPolicy sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy() , getLayout sample code for java.awt.Container.getLayout() definition code for java.awt.Container.getLayout() , getMousePosition sample code for java.awt.Container.getMousePosition(boolean) definition code for java.awt.Container.getMousePosition(boolean) , insets sample code for java.awt.Container.insets() definition code for java.awt.Container.insets() , invalidate sample code for java.awt.Container.invalidate() definition code for java.awt.Container.invalidate() , isAncestorOf sample code for java.awt.Container.isAncestorOf(java.awt.Component) definition code for java.awt.Container.isAncestorOf(java.awt.Component) , isFocusCycleRoot sample code for java.awt.Container.isFocusCycleRoot() definition code for java.awt.Container.isFocusCycleRoot() , isFocusCycleRoot sample code for java.awt.Container.isFocusCycleRoot(java.awt.Container) definition code for java.awt.Container.isFocusCycleRoot(java.awt.Container) , isFocusTraversalPolicyProvider sample code for java.awt.Container.isFocusTraversalPolicyProvider() definition code for java.awt.Container.isFocusTraversalPolicyProvider() , isFocusTraversalPolicySet sample code for java.awt.Container.isFocusTraversalPolicySet() definition code for java.awt.Container.isFocusTraversalPolicySet() , layout sample code for java.awt.Container.layout() definition code for java.awt.Container.layout() , list sample code for java.awt.Container.list(java.io.PrintStream, int) definition code for java.awt.Container.list(java.io.PrintStream, int) , list sample code for java.awt.Container.list(java.io.PrintWriter, int) definition code for java.awt.Container.list(java.io.PrintWriter, int) , locate sample code for java.awt.Container.locate(int, int) definition code for java.awt.Container.locate(int, int) , minimumSize sample code for java.awt.Container.minimumSize() definition code for java.awt.Container.minimumSize() , paintComponents sample code for java.awt.Container.paintComponents(java.awt.Graphics) definition code for java.awt.Container.paintComponents(java.awt.Graphics) , preferredSize sample code for java.awt.Container.preferredSize() definition code for java.awt.Container.preferredSize() , printComponents sample code for java.awt.Container.printComponents(java.awt.Graphics) definition code for java.awt.Container.printComponents(java.awt.Graphics) , processContainerEvent sample code for java.awt.Container.processContainerEvent(java.awt.event.ContainerEvent) definition code for java.awt.Container.processContainerEvent(java.awt.event.ContainerEvent) , processEvent sample code for java.awt.Container.processEvent(java.awt.AWTEvent) definition code for java.awt.Container.processEvent(java.awt.AWTEvent) , remove sample code for java.awt.Container.remove(java.awt.Component) definition code for java.awt.Container.remove(java.awt.Component) , remove sample code for java.awt.Container.remove(int) definition code for java.awt.Container.remove(int) , removeAll sample code for java.awt.Container.removeAll() definition code for java.awt.Container.removeAll() , removeContainerListener sample code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) , setComponentZOrder sample code for java.awt.Container.setComponentZOrder(java.awt.Component, int) definition code for java.awt.Container.setComponentZOrder(java.awt.Component, int) , setFocusCycleRoot sample code for java.awt.Container.setFocusCycleRoot(boolean) definition code for java.awt.Container.setFocusCycleRoot(boolean) , setFocusTraversalPolicy sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , setFocusTraversalPolicyProvider sample code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) definition code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) , setLayout sample code for java.awt.Container.setLayout(java.awt.LayoutManager) definition code for java.awt.Container.setLayout(java.awt.LayoutManager) , transferFocusBackward sample code for java.awt.Container.transferFocusBackward() definition code for java.awt.Container.transferFocusBackward() , transferFocusDownCycle sample code for java.awt.Container.transferFocusDownCycle() definition code for java.awt.Container.transferFocusDownCycle() , validate sample code for java.awt.Container.validate() definition code for java.awt.Container.validate() , validateTree sample code for java.awt.Container.validateTree() definition code for java.awt.Container.validateTree()
 
Methods inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
action sample code for java.awt.Component.action(java.awt.Event, java.lang.Object) definition code for java.awt.Component.action(java.awt.Event, java.lang.Object) , add sample code for java.awt.Component.add(java.awt.PopupMenu) definition code for java.awt.Component.add(java.awt.PopupMenu) , addComponentListener sample code for java.awt.Component.addComponentListener(java.awt.event.ComponentListener) definition code for java.awt.Component.addComponentListener(java.awt.event.ComponentListener) , addFocusListener sample code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) , addHierarchyBoundsListener sample code for java.awt.Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) definition code for java.awt.Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) , addHierarchyListener sample code for java.awt.Component.addHierarchyListener(java.awt.event.HierarchyListener) definition code for java.awt.Component.addHierarchyListener(java.awt.event.HierarchyListener) , addInputMethodListener sample code for java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener) definition code for java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener) , addKeyListener sample code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) , addMouseListener sample code for java.awt.Component.addMouseListener(java.awt.event.MouseListener) definition code for java.awt.Component.addMouseListener(java.awt.event.MouseListener) , addMouseMotionListener sample code for java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener) definition code for java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener) , addMouseWheelListener sample code for java.awt.Component.addMouseWheelListener(java.awt.event.MouseWheelListener) definition code for java.awt.Component.addMouseWheelListener(java.awt.event.MouseWheelListener) , bounds sample code for java.awt.Component.bounds() definition code for java.awt.Component.bounds() , checkImage sample code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) , checkImage sample code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , coalesceEvents sample code for java.awt.Component.coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent) definition code for java.awt.Component.coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent) , contains sample code for java.awt.Component.contains(java.awt.Point) definition code for java.awt.Component.contains(java.awt.Point) , createImage sample code for java.awt.Component.createImage(java.awt.image.ImageProducer) definition code for java.awt.Component.createImage(java.awt.image.ImageProducer) , createImage sample code for java.awt.Component.createImage(int, int) definition code for java.awt.Component.createImage(int, int) , createVolatileImage sample code for java.awt.Component.createVolatileImage(int, int) definition code for java.awt.Component.createVolatileImage(int, int) , createVolatileImage sample code for java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities) definition code for java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities) , disableEvents sample code for java.awt.Component.disableEvents(long) definition code for java.awt.Component.disableEvents(long) , dispatchEvent sample code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) , enable sample code for java.awt.Component.enable(boolean) definition code for java.awt.Component.enable(boolean) , enableEvents sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long) , enableInputMethods sample code for java.awt.Component.enableInputMethods(boolean) definition code for java.awt.Component.enableInputMethods(boolean) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, byte, byte) definition code for java.awt.Component.firePropertyChange(java.lang.String, byte, byte) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, double, double) definition code for java.awt.Component.firePropertyChange(java.lang.String, double, double) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, float, float) definition code for java.awt.Component.firePropertyChange(java.lang.String, float, float) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, long, long) definition code for java.awt.Component.firePropertyChange(java.lang.String, long, long) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, short, short) definition code for java.awt.Component.firePropertyChange(java.lang.String, short, short) , getBackground sample code for java.awt.Component.getBackground() definition code for java.awt.Component.getBackground() , getBounds sample code for java.awt.Component.getBounds() definition code for java.awt.Component.getBounds() , getColorModel sample code for java.awt.Component.getColorModel() definition code for java.awt.Component.getColorModel() , getComponentListeners sample code for java.awt.Component.getComponentListeners() definition code for java.awt.Component.getComponentListeners() , getComponentOrientation sample code for java.awt.Component.getComponentOrientation() definition code for java.awt.Component.getComponentOrientation() , getCursor sample code for java.awt.Component.getCursor() definition code for java.awt.Component.getCursor() , getDropTarget sample code for java.awt.Component.getDropTarget() definition code for java.awt.Component.getDropTarget() , getFocusCycleRootAncestor sample code for java.awt.Component.getFocusCycleRootAncestor() definition code for java.awt.Component.getFocusCycleRootAncestor() , getFocusListeners sample code for java.awt.Component.getFocusListeners() definition code for java.awt.Component.getFocusListeners() , getFocusTraversalKeysEnabled sample code for java.awt.Component.getFocusTraversalKeysEnabled() definition code for java.awt.Component.getFocusTraversalKeysEnabled() , getFont sample code for java.awt.Component.getFont() definition code for java.awt.Component.getFont() , getForeground sample code for java.awt.Component.getForeground() definition code for java.awt.Component.getForeground() , getGraphicsConfiguration sample code for java.awt.Component.getGraphicsConfiguration() definition code for java.awt.Component.getGraphicsConfiguration() , getHierarchyBoundsListeners sample code for java.awt.Component.getHierarchyBoundsListeners() definition code for java.awt.Component.getHierarchyBoundsListeners() , getHierarchyListeners sample code for java.awt.Component.getHierarchyListeners() definition code for java.awt.Component.getHierarchyListeners() , getIgnoreRepaint sample code for java.awt.Component.getIgnoreRepaint() definition code for java.awt.Component.getIgnoreRepaint() , getInputContext sample code for java.awt.Component.getInputContext() definition code for java.awt.Component.getInputContext() , getInputMethodListeners sample code for java.awt.Component.getInputMethodListeners() definition code for java.awt.Component.getInputMethodListeners() , getInputMethodRequests sample code for java.awt.Component.getInputMethodRequests() definition code for java.awt.Component.getInputMethodRequests() , getKeyListeners sample code for java.awt.Component.getKeyListeners() definition code for java.awt.Component.getKeyListeners() , getLocale sample code for java.awt.Component.getLocale() definition code for java.awt.Component.getLocale() , getLocation sample code for java.awt.Component.getLocation() definition code for java.awt.Component.getLocation() , getLocationOnScreen sample code for java.awt.Component.getLocationOnScreen() definition code for java.awt.Component.getLocationOnScreen() , getMouseListeners sample code for java.awt.Component.getMouseListeners() definition code for java.awt.Component.getMouseListeners() , getMouseMotionListeners sample code for java.awt.Component.getMouseMotionListeners() definition code for java.awt.Component.getMouseMotionListeners() , getMousePosition sample code for java.awt.Component.getMousePosition() definition code for java.awt.Component.getMousePosition() , getMouseWheelListeners sample code for java.awt.Component.getMouseWheelListeners() definition code for java.awt.Component.getMouseWheelListeners() , getName sample code for java.awt.Component.getName() definition code for java.awt.Component.getName() , getParent sample code for java.awt.Component.getParent() definition code for java.awt.Component.getParent() , getPeer sample code for java.awt.Component.getPeer() definition code for java.awt.Component.getPeer() , getPropertyChangeListeners sample code for java.awt.Component.getPropertyChangeListeners() definition code for java.awt.Component.getPropertyChangeListeners() , getPropertyChangeListeners sample code for java.awt.Component.getPropertyChangeListeners(java.lang.String) definition code for java.awt.Component.getPropertyChangeListeners(java.lang.String) , getSize sample code for java.awt.Component.getSize() definition code for java.awt.Component.getSize() , getToolkit sample code for java.awt.Component.getToolkit() definition code for java.awt.Component.getToolkit() , getTreeLock sample code for java.awt.Component.getTreeLock() definition code for java.awt.Component.getTreeLock() , gotFocus sample code for java.awt.Component.gotFocus(java.awt.Event, java.lang.Object) definition code for java.awt.Component.gotFocus(java.awt.Event, java.lang.Object) , handleEvent sample code for java.awt.Component.handleEvent(java.awt.Event) definition code for java.awt.Component.handleEvent(java.awt.Event) , hasFocus sample code for java.awt.Component.hasFocus() definition code for java.awt.Component.hasFocus() , hide sample code for java.awt.Component.hide() definition code for java.awt.Component.hide() , imageUpdate sample code for java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int) , inside sample code for java.awt.Component.inside(int, int) definition code for java.awt.Component.inside(int, int) , isBackgroundSet sample code for java.awt.Component.isBackgroundSet() definition code for java.awt.Component.isBackgroundSet() , isCursorSet sample code for java.awt.Component.isCursorSet() definition code for java.awt.Component.isCursorSet() , isDisplayable sample code for java.awt.Component.isDisplayable() definition code for java.awt.Component.isDisplayable() , isEnabled sample code for java.awt.Component.isEnabled() definition code for java.awt.Component.isEnabled() , isFocusable sample code for java.awt.Component.isFocusable() definition code for java.awt.Component.isFocusable() , isFocusOwner sample code for java.awt.Component.isFocusOwner() definition code for java.awt.Component.isFocusOwner() , isFocusTraversable sample code for java.awt.Component.isFocusTraversable() definition code for java.awt.Component.isFocusTraversable() , isFontSet sample code for java.awt.Component.isFontSet() definition code for java.awt.Component.isFontSet() , isForegroundSet sample code for java.awt.Component.isForegroundSet() definition code for java.awt.Component.isForegroundSet() , isLightweight sample code for java.awt.Component.isLightweight() definition code for java.awt.Component.isLightweight() , isMaximumSizeSet sample code for java.awt.Component.isMaximumSizeSet() definition code for java.awt.Component.isMaximumSizeSet() , isMinimumSizeSet sample code for java.awt.Component.isMinimumSizeSet() definition code for java.awt.Component.isMinimumSizeSet() , isPreferredSizeSet sample code for java.awt.Component.isPreferredSizeSet() definition code for java.awt.Component.isPreferredSizeSet() , isShowing sample code for java.awt.Component.isShowing() definition code for java.awt.Component.isShowing() , isValid sample code for java.awt.Component.isValid() definition code for java.awt.Component.isValid() , isVisible sample code for java.awt.Component.isVisible() definition code for java.awt.Component.isVisible() , keyDown sample code for java.awt.Component.keyDown(java.awt.Event, int) definition code for java.awt.Component.keyDown(java.awt.Event, int) , keyUp sample code for java.awt.Component.keyUp(java.awt.Event, int) definition code for java.awt.Component.keyUp(java.awt.Event, int) , list sample code for java.awt.Component.list() definition code for java.awt.Component.list() , list sample code for java.awt.Component.list(java.io.PrintStream) definition code for java.awt.Component.list(java.io.PrintStream) , list sample code for java.awt.Component.list(java.io.PrintWriter) definition code for java.awt.Component.list(java.io.PrintWriter) , location sample code for java.awt.Component.location() definition code for java.awt.Component.location() , lostFocus sample code for java.awt.Component.lostFocus(java.awt.Event, java.lang.Object) definition code for java.awt.Component.lostFocus(java.awt.Event, java.lang.Object) , mouseDown sample code for java.awt.Component.mouseDown(java.awt.Event, int, int) definition code for java.awt.Component.mouseDown(java.awt.Event, int, int) , mouseDrag sample code for java.awt.Component.mouseDrag(java.awt.Event, int, int) definition code for java.awt.Component.mouseDrag(java.awt.Event, int, int) , mouseEnter sample code for java.awt.Component.mouseEnter(java.awt.Event, int, int) definition code for java.awt.Component.mouseEnter(java.awt.Event, int, int) , mouseExit sample code for java.awt.Component.mouseExit(java.awt.Event, int, int) definition code for java.awt.Component.mouseExit(java.awt.Event, int, int) , mouseMove sample code for java.awt.Component.mouseMove(java.awt.Event, int, int) definition code for java.awt.Component.mouseMove(java.awt.Event, int, int) , mouseUp sample code for java.awt.Component.mouseUp(java.awt.Event, int, int) definition code for java.awt.Component.mouseUp(java.awt.Event, int, int) , move sample code for java.awt.Component.move(int, int) definition code for java.awt.Component.move(int, int) , nextFocus sample code for java.awt.Component.nextFocus() definition code for java.awt.Component.nextFocus() , paintAll sample code for java.awt.Component.paintAll(java.awt.Graphics) definition code for java.awt.Component.paintAll(java.awt.Graphics) , postEvent sample code for java.awt.Component.postEvent(java.awt.Event) definition code for java.awt.Component.postEvent(java.awt.Event) , prepareImage sample code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) , prepareImage sample code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , processComponentEvent sample code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) definition code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) , processFocusEvent sample code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) definition code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) , processHierarchyBoundsEvent sample code for java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent) , processHierarchyEvent sample code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) , processInputMethodEvent sample code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) definition code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) , processMouseWheelEvent sample code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) definition code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) , remove sample code for java.awt.Component.remove(java.awt.MenuComponent) definition code for java.awt.Component.remove(java.awt.MenuComponent) , removeComponentListener sample code for java.awt.Component.removeComponentListener(java.awt.event.ComponentListener) definition code for java.awt.Component.removeComponentListener(java.awt.event.ComponentListener) , removeFocusListener sample code for java.awt.Component.removeFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.removeFocusListener(java.awt.event.FocusListener) , removeHierarchyBoundsListener sample code for java.awt.Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) definition code for java.awt.Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) , removeHierarchyListener sample code for java.awt.Component.removeHierarchyListener(java.awt.event.HierarchyListener) definition code for java.awt.Component.removeHierarchyListener(java.awt.event.HierarchyListener) , removeInputMethodListener sample code for java.awt.Component.removeInputMethodListener(java.awt.event.InputMethodListener) definition code for java.awt.Component.removeInputMethodListener(java.awt.event.InputMethodListener) , removeKeyListener sample code for java.awt.Component.removeKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.removeKeyListener(java.awt.event.KeyListener) , removeMouseListener sample code for java.awt.Component.removeMouseListener(java.awt.event.MouseListener) definition code for java.awt.Component.removeMouseListener(java.awt.event.MouseListener) , removeMouseMotionListener sample code for java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) definition code for java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) , removeMouseWheelListener sample code for java.awt.Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) definition code for java.awt.Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) , removePropertyChangeListener sample code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) , removePropertyChangeListener sample code for java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , repaint sample code for java.awt.Component.repaint() definition code for java.awt.Component.repaint() , repaint sample code for java.awt.Component.repaint(int, int, int, int) definition code for java.awt.Component.repaint(int, int, int, int) , repaint sample code for java.awt.Component.repaint(long) definition code for java.awt.Component.repaint(long) , resize sample code for java.awt.Component.resize(java.awt.Dimension) definition code for java.awt.Component.resize(java.awt.Dimension) , resize sample code for java.awt.Component.resize(int, int) definition code for java.awt.Component.resize(int, int) , setBounds sample code for java.awt.Component.setBounds(int, int, int, int) definition code for java.awt.Component.setBounds(int, int, int, int) , setBounds sample code for java.awt.Component.setBounds(java.awt.Rectangle) definition code for java.awt.Component.setBounds(java.awt.Rectangle) , setComponentOrientation sample code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) , setCursor sample code for java.awt.Component.setCursor(java.awt.Cursor) definition code for java.awt.Component.setCursor(java.awt.Cursor) , setDropTarget sample code for java.awt.Component.setDropTarget(java.awt.dnd.DropTarget) definition code for java.awt.Component.setDropTarget(java.awt.dnd.DropTarget) , setFocusable sample code for java.awt.Component.setFocusable(boolean) definition code for java.awt.Component.setFocusable(boolean) , setFocusTraversalKeysEnabled sample code for java.awt.Component.setFocusTraversalKeysEnabled(boolean) definition code for java.awt.Component.setFocusTraversalKeysEnabled(boolean) , setIgnoreRepaint sample code for java.awt.Component.setIgnoreRepaint(boolean) definition code for java.awt.Component.setIgnoreRepaint(boolean) , setLocale sample code for java.awt.Component.setLocale(java.util.Locale) definition code for java.awt.Component.setLocale(java.util.Locale) , setLocation sample code for java.awt.Component.setLocation(int, int) definition code for java.awt.Component.setLocation(int, int) , setLocation sample code for java.awt.Component.setLocation(java.awt.Point) definition code for java.awt.Component.setLocation(java.awt.Point) , setName sample code for java.awt.Component.setName(java.lang.String) definition code for java.awt.Component.setName(java.lang.String) , setSize sample code for java.awt.Component.setSize(java.awt.Dimension) definition code for java.awt.Component.setSize(java.awt.Dimension) , setSize sample code for java.awt.Component.setSize(int, int) definition code for java.awt.Component.setSize(int, int) , show sample code for java.awt.Component.show() definition code for java.awt.Component.show() , show sample code for java.awt.Component.show(boolean) definition code for java.awt.Component.show(boolean) , size sample code for java.awt.Component.size() definition code for java.awt.Component.size() , toString sample code for java.awt.Component.toString() definition code for java.awt.Component.toString() , transferFocus sample code for java.awt.Component.transferFocus() definition code for java.awt.Component.transferFocus() , transferFocusUpCycle sample code for java.awt.Component.transferFocusUpCycle() definition code for java.awt.Component.transferFocusUpCycle()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

dataModel sample code for javax.swing.JComboBox.dataModel

protected ComboBoxModel sample code for javax.swing.ComboBoxModel definition code for javax.swing.ComboBoxModel  dataModel
This protected field is implementation specific. Do not access directly or override. Use the accessor methods instead.

See Also:
getModel() sample code for javax.swing.JComboBox.getModel() definition code for javax.swing.JComboBox.getModel() , setModel(javax.swing.ComboBoxModel) sample code for javax.swing.JComboBox.setModel(javax.swing.ComboBoxModel) definition code for javax.swing.JComboBox.setModel(javax.swing.ComboBoxModel)

renderer sample code for javax.swing.JComboBox.renderer

protected ListCellRenderer sample code for javax.swing.ListCellRenderer definition code for javax.swing.ListCellRenderer  renderer
This protected field is implementation specific. Do not access directly or override. Use the accessor methods instead.

See Also:
getRenderer() sample code for javax.swing.JComboBox.getRenderer() definition code for javax.swing.JComboBox.getRenderer() , setRenderer(javax.swing.ListCellRenderer) sample code for javax.swing.JComboBox.setRenderer(javax.swing.ListCellRenderer) definition code for javax.swing.JComboBox.setRenderer(javax.swing.ListCellRenderer)

editor sample code for javax.swing.JComboBox.editor

protected ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor  editor
This protected field is implementation specific. Do not access directly or override. Use the accessor methods instead.

See Also:
getEditor() sample code for javax.swing.JComboBox.getEditor() definition code for javax.swing.JComboBox.getEditor() , setEditor(javax.swing.ComboBoxEditor) sample code for javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor) definition code for javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor)

maximumRowCount sample code for javax.swing.JComboBox.maximumRowCount

protected int maximumRowCount
This protected field is implementation specific. Do not access directly or override. Use the accessor methods instead.

See Also:
getMaximumRowCount() sample code for javax.swing.JComboBox.getMaximumRowCount() definition code for javax.swing.JComboBox.getMaximumRowCount() , setMaximumRowCount(int) sample code for javax.swing.JComboBox.setMaximumRowCount(int) definition code for javax.swing.JComboBox.setMaximumRowCount(int)

isEditable sample code for javax.swing.JComboBox.isEditable

protected boolean isEditable
This protected field is implementation specific. Do not access directly or override. Use the accessor methods instead.

See Also:
isEditable sample code for javax.swing.JComboBox.isEditable definition code for javax.swing.JComboBox.isEditable , setEditable(boolean) sample code for javax.swing.JComboBox.setEditable(boolean) definition code for javax.swing.JComboBox.setEditable(boolean)

keySelectionManager sample code for javax.swing.JComboBox.keySelectionManager

protected JComboBox.KeySelectionManager sample code for javax.swing.JComboBox.KeySelectionManager definition code for javax.swing.JComboBox.KeySelectionManager  keySelectionManager
This protected field is implementation specific. Do not access directly or override. Use the accessor methods instead.

See Also:
setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager) sample code for javax.swing.JComboBox.setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager) definition code for javax.swing.JComboBox.setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager) , getKeySelectionManager() sample code for javax.swing.JComboBox.getKeySelectionManager() definition code for javax.swing.JComboBox.getKeySelectionManager()

actionCommand sample code for javax.swing.JComboBox.actionCommand

protected String sample code for java.lang.String definition code for java.lang.String  actionCommand
This protected field is implementation specific. Do not access directly or override. Use the accessor methods instead.

See Also:
setActionCommand(java.lang.String) sample code for javax.swing.JComboBox.setActionCommand(java.lang.String) definition code for javax.swing.JComboBox.setActionCommand(java.lang.String) , getActionCommand() sample code for javax.swing.JComboBox.getActionCommand() definition code for javax.swing.JComboBox.getActionCommand()

lightWeightPopupEnabled sample code for javax.swing.JComboBox.lightWeightPopupEnabled

protected boolean lightWeightPopupEnabled
This protected field is implementation specific. Do not access directly or override. Use the accessor methods instead.

See Also:
setLightWeightPopupEnabled(boolean) sample code for javax.swing.JComboBox.setLightWeightPopupEnabled(boolean) definition code for javax.swing.JComboBox.setLightWeightPopupEnabled(boolean) , isLightWeightPopupEnabled() sample code for javax.swing.JComboBox.isLightWeightPopupEnabled() definition code for javax.swing.JComboBox.isLightWeightPopupEnabled()

selectedItemReminder sample code for javax.swing.JComboBox.selectedItemReminder

protected Object sample code for java.lang.Object definition code for java.lang.Object  selectedItemReminder
This protected field is implementation specific. Do not access directly or override.

Constructor Detail

JComboBox sample code for javax.swing.JComboBox(javax.swing.ComboBoxModel) definition code for javax.swing.JComboBox(javax.swing.ComboBoxModel)

public JComboBox(ComboBoxModel sample code for javax.swing.ComboBoxModel definition code for javax.swing.ComboBoxModel  aModel)
Creates a JComboBox that takes it's items from an existing ComboBoxModel. Since the ComboBoxModel is provided, a combo box created using this constructor does not create a default combo box model and may impact how the insert, remove and add methods behave.

Parameters:
aModel - the ComboBoxModel that provides the displayed list of items
See Also:
DefaultComboBoxModel sample code for javax.swing.DefaultComboBoxModel definition code for javax.swing.DefaultComboBoxModel

JComboBox sample code for javax.swing.JComboBox(java.lang.Object[]) definition code for javax.swing.JComboBox(java.lang.Object[])

public JComboBox(Object sample code for java.lang.Object definition code for java.lang.Object [] items)
Creates a JComboBox that contains the elements in the specified array. By default the first item in the array (and therefore the data model) becomes selected.

Parameters:
items - an array of objects to insert into the combo box
See Also:
DefaultComboBoxModel sample code for javax.swing.DefaultComboBoxModel definition code for javax.swing.DefaultComboBoxModel

JComboBox sample code for javax.swing.JComboBox(java.util.Vector<?>) definition code for javax.swing.JComboBox(java.util.Vector<?>)

public JComboBox(Vector sample code for java.util.Vector definition code for java.util.Vector <?> items)
Creates a JComboBox that contains the elements in the specified Vector. By default the first item in the vector and therefore the data model) becomes selected.

Parameters:
items - an array of vectors to insert into the combo box
See Also:
DefaultComboBoxModel sample code for javax.swing.DefaultComboBoxModel definition code for javax.swing.DefaultComboBoxModel

JComboBox sample code for javax.swing.JComboBox() definition code for javax.swing.JComboBox()

public JComboBox()
Creates a JComboBox with a default data model. The default data model is an empty list of objects. Use addItem to add items. By default the first item in the data model becomes selected.

See Also:
DefaultComboBoxModel sample code for javax.swing.DefaultComboBoxModel definition code for javax.swing.DefaultComboBoxModel
Method Detail

installAncestorListener sample code for javax.swing.JComboBox.installAncestorListener() definition code for javax.swing.JComboBox.installAncestorListener()

protected void installAncestorListener()

setUI sample code for javax.swing.JComboBox.setUI(javax.swing.plaf.ComboBoxUI) definition code for javax.swing.JComboBox.setUI(javax.swing.plaf.ComboBoxUI)

public void setUI(ComboBoxUI sample code for javax.swing.plaf.ComboBoxUI definition code for javax.swing.plaf.ComboBoxUI  ui)
Sets the L&F object that renders this component.

Parameters:
ui - the ComboBoxUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent) sample code for javax.swing.UIDefaults.getUI(javax.swing.JComponent) definition code for javax.swing.UIDefaults.getUI(javax.swing.JComponent)

updateUI sample code for javax.swing.JComboBox.updateUI() definition code for javax.swing.JComboBox.updateUI()

public void updateUI()
Resets the UI property to a value from the current look and feel.

Overrides:
updateUI sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
See Also:
JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

getUIClassID sample code for javax.swing.JComboBox.getUIClassID() definition code for javax.swing.JComboBox.getUIClassID()

public String sample code for java.lang.String definition code for java.lang.String  getUIClassID()
Returns the name of the L&F class that renders this component.

Overrides:
getUIClassID sample code for javax.swing.JComponent.getUIClassID() definition code for javax.swing.JComponent.getUIClassID() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Returns:
the string "ComboBoxUI"
See Also:
JComponent.getUIClassID() sample code for javax.swing.JComponent.getUIClassID() definition code for javax.swing.JComponent.getUIClassID() , UIDefaults.getUI(javax.swing.JComponent) sample code for javax.swing.UIDefaults.getUI(javax.swing.JComponent) definition code for javax.swing.UIDefaults.getUI(javax.swing.JComponent)

getUI sample code for javax.swing.JComboBox.getUI() definition code for javax.swing.JComboBox.getUI()

public ComboBoxUI sample code for javax.swing.plaf.ComboBoxUI definition code for javax.swing.plaf.ComboBoxUI  getUI()
Returns the L&F object that renders this component.

Returns:
the ComboBoxUI object that renders this component

setModel sample code for javax.swing.JComboBox.setModel(javax.swing.ComboBoxModel) definition code for javax.swing.JComboBox.setModel(javax.swing.ComboBoxModel)

public void setModel(ComboBoxModel sample code for javax.swing.ComboBoxModel definition code for javax.swing.ComboBoxModel  aModel)
Sets the data model that the JComboBox uses to obtain the list of items.

Parameters:
aModel - the ComboBoxModel that provides the displayed list of items

getModel sample code for javax.swing.JComboBox.getModel() definition code for javax.swing.JComboBox.getModel()

public ComboBoxModel sample code for javax.swing.ComboBoxModel definition code for javax.swing.ComboBoxModel  getModel()
Returns the data model currently used by the JComboBox.

Returns:
the ComboBoxModel that provides the displayed list of items

setLightWeightPopupEnabled sample code for javax.swing.JComboBox.setLightWeightPopupEnabled(boolean) definition code for javax.swing.JComboBox.setLightWeightPopupEnabled(boolean)

public void setLightWeightPopupEnabled(boolean aFlag)
Sets the lightWeightPopupEnabled property, which provides a hint as to whether or not a lightweight Component should be used to contain the JComboBox, versus a heavyweight Component such as a Panel or a Window. The decision of lightweight versus heavyweight is ultimately up to the JComboBox. Lightweight windows are more efficient than heavyweight windows, but lightweight and heavyweight components do not mix well in a GUI. If your application mixes lightweight and heavyweight components, you should disable lightweight popups. The default value for the lightWeightPopupEnabled property is true, unless otherwise specified by the look and feel. Some look and feels always use heavyweight popups, no matter what the value of this property.

See the article Mixing Heavy and Light Components on The Swing Connection This method fires a property changed event.

Parameters:
aFlag - if true, lightweight popups are desired

isLightWeightPopupEnabled sample code for javax.swing.JComboBox.isLightWeightPopupEnabled() definition code for javax.swing.JComboBox.isLightWeightPopupEnabled()

public boolean isLightWeightPopupEnabled()
Gets the value of the lightWeightPopupEnabled property.

Returns:
the value of the lightWeightPopupEnabled property
See Also:
setLightWeightPopupEnabled(boolean) sample code for javax.swing.JComboBox.setLightWeightPopupEnabled(boolean) definition code for javax.swing.JComboBox.setLightWeightPopupEnabled(boolean)

setEditable sample code for javax.swing.JComboBox.setEditable(boolean) definition code for javax.swing.JComboBox.setEditable(boolean)

public void setEditable(boolean aFlag)
Determines whether the JComboBox field is editable. An editable JComboBox allows the user to type into the field or selected an item from the list to initialize the field, after which it can be edited. (The editing affects only the field, the list item remains intact.) A non editable JComboBox displays the selected item in the field, but the selection cannot be modified.

Parameters:
aFlag - a boolean value, where true indicates that the field is editable

isEditable sample code for javax.swing.JComboBox.isEditable() definition code for javax.swing.JComboBox.isEditable()

public boolean isEditable()
Returns true if the JComboBox is editable. By default, a combo box is not editable.

Returns:
true if the JComboBox is editable, else false

setMaximumRowCount sample code for javax.swing.JComboBox.setMaximumRowCount(int) definition code for javax.swing.JComboBox.setMaximumRowCount(int)

public void setMaximumRowCount(int count)
Sets the maximum number of rows the JComboBox displays. If the number of objects in the model is greater than count, the combo box uses a scrollbar.

Parameters:
count - an integer specifying the maximum number of items to display in the list before using a scrollbar

getMaximumRowCount sample code for javax.swing.JComboBox.getMaximumRowCount() definition code for javax.swing.JComboBox.getMaximumRowCount()

public int getMaximumRowCount()
Returns the maximum number of items the combo box can display without a scrollbar

Returns:
an integer specifying the maximum number of items that are displayed in the list before using a scrollbar

setRenderer sample code for javax.swing.JComboBox.setRenderer(javax.swing.ListCellRenderer) definition code for javax.swing.JComboBox.setRenderer(javax.swing.ListCellRenderer)

public void setRenderer(ListCellRenderer sample code for javax.swing.ListCellRenderer definition code for javax.swing.ListCellRenderer  aRenderer)
Sets the renderer that paints the list items and the item selected from the list in the JComboBox field. The renderer is used if the JComboBox is not editable. If it is editable, the editor is used to render and edit the selected item.

The default renderer displays a string or an icon. Other renderers can handle graphic images and composite items.

To display the selected item, aRenderer.getListCellRendererComponent is called, passing the list object and an index of -1.

Parameters:
aRenderer - the ListCellRenderer that displays the selected item
See Also:
setEditor(javax.swing.ComboBoxEditor) sample code for javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor) definition code for javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor)

getRenderer sample code for javax.swing.JComboBox.getRenderer() definition code for javax.swing.JComboBox.getRenderer()

public ListCellRenderer sample code for javax.swing.ListCellRenderer definition code for javax.swing.ListCellRenderer  getRenderer()
Returns the renderer used to display the selected item in the JComboBox field.

Returns:
the ListCellRenderer that displays the selected item.

setEditor sample code for javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor) definition code for javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor)

public void setEditor(ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor  anEditor)
Sets the editor used to paint and edit the selected item in the JComboBox field. The editor is used only if the receiving JComboBox is editable. If not editable, the combo box uses the renderer to paint the selected item.

Parameters:
anEditor - the ComboBoxEditor that displays the selected item
See Also:
setRenderer(javax.swing.ListCellRenderer) sample code for javax.swing.JComboBox.setRenderer(javax.swing.ListCellRenderer) definition code for javax.swing.JComboBox.setRenderer(javax.swing.ListCellRenderer)

getEditor sample code for javax.swing.JComboBox.getEditor() definition code for javax.swing.JComboBox.getEditor()

public ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor  getEditor()
Returns the editor used to paint and edit the selected item in the JComboBox field.

Returns:
the ComboBoxEditor that displays the selected item

setSelectedItem sample code for javax.swing.JComboBox.setSelectedItem(java.lang.Object) definition code for javax.swing.JComboBox.setSelectedItem(java.lang.Object)

public void setSelectedItem(Object sample code for java.lang.Object definition code for java.lang.Object  anObject)
Sets the selected item in the combo box display area to the object in the argument. If anObject is in the list, the display area shows anObject selected.

If anObject is not in the list and the combo box is uneditable, it will not change the current selection. For editable combo boxes, the selection will change to anObject.

If this constitutes a change in the selected item, ItemListeners added to the combo box will be notified with one or two ItemEvents. If there is a current selected item, an ItemEvent will be fired and the state change will be ItemEvent.DESELECTED. If anObject is in the list and is not currently selected then an ItemEvent will be fired and the state change will be ItemEvent.SELECTED.

ActionListeners added to the combo box will be notified with an ActionEvent when this method is called.

Parameters:
anObject - the list object to select; use null to clear the selection

getSelectedItem sample code for javax.swing.JComboBox.getSelectedItem() definition code for javax.swing.JComboBox.getSelectedItem()

public Object sample code for java.lang.Object definition code for java.lang.Object  getSelectedItem()
Returns the current selected item.

If the combo box is editable, then this value may not have been added to the combo box with addItem, insertItemAt or the data constructors.

Returns:
the current selected Object
See Also:
setSelectedItem(java.lang.Object) sample code for javax.swing.JComboBox.setSelectedItem(java.lang.Object) definition code for javax.swing.JComboBox.setSelectedItem(java.lang.Object)

setSelectedIndex sample code for javax.swing.JComboBox.setSelectedIndex(int) definition code for javax.swing.JComboBox.setSelectedIndex(int)

public void setSelectedIndex(int anIndex)
Selects the item at index anIndex.

Parameters:
anIndex - an integer specifying the list item to select, where 0 specifies the first item in the list and -1 indicates no selection
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if anIndex < -1 or anIndex is greater than or equal to size

getSelectedIndex sample code for javax.swing.JComboBox.getSelectedIndex() definition code for javax.swing.JComboBox.getSelectedIndex()

public int getSelectedIndex()
Returns the first item in the list that matches the given item. The result is not always defined if the JComboBox allows selected items that are not in the list. Returns -1 if there is no selected item or if the user specified an item which is not in the list.

Returns:
an integer specifying the currently selected list item, where 0 specifies the first item in the list; or -1 if no item is selected or if the currently selected item is not in the list

getPrototypeDisplayValue sample code for javax.swing.JComboBox.getPrototypeDisplayValue() definition code for javax.swing.JComboBox.getPrototypeDisplayValue()

public Object sample code for java.lang.Object definition code for java.lang.Object  getPrototypeDisplayValue()
Returns the "prototypical display" value - an Object used for the calculation of the display height and width.

Returns:
the value of the prototypeDisplayValue property
Since:
1.4
See Also:
setPrototypeDisplayValue(java.lang.Object) sample code for javax.swing.JComboBox.setPrototypeDisplayValue(java.lang.Object) definition code for javax.swing.JComboBox.setPrototypeDisplayValue(java.lang.Object)

setPrototypeDisplayValue sample code for javax.swing.JComboBox.setPrototypeDisplayValue(java.lang.Object) definition code for javax.swing.JComboBox.setPrototypeDisplayValue(java.lang.Object)

public void setPrototypeDisplayValue(Object sample code for java.lang.Object definition code for java.lang.Object  prototypeDisplayValue)
Sets the prototype display value used to calculate the size of the display for the UI portion.

If a prototype display value is specified, the preferred size of the combo box is calculated by configuring the renderer with the prototype display value and obtaining its preferred size. Specifying the preferred display value is often useful when the combo box will be displaying large amounts of data. If no prototype display value has been specified, the renderer must be configured for each value from the model and its preferred size obtained, which can be relatively expensive.

Parameters:
prototypeDisplayValue -
Since:
1.4
See Also:
getPrototypeDisplayValue() sample code for javax.swing.JComboBox.getPrototypeDisplayValue() definition code for javax.swing.JComboBox.getPrototypeDisplayValue()

addItem sample code for javax.swing.JComboBox.addItem(java.lang.Object) definition code for javax.swing.JComboBox.addItem(java.lang.Object)

public void addItem(Object sample code for java.lang.Object definition code for java.lang.Object  anObject)
Adds an item to the item list. This method works only if the JComboBox uses a mutable data model.

Warning: Focus and keyboard navigation problems may arise if you add duplicate String objects. A workaround is to add new objects instead of String objects and make sure that the toString() method is defined. For example:

   comboBox.addItem(makeObj("Item 1"));
   comboBox.addItem(makeObj("Item 1"));
   ...
   private Object makeObj(final String item)  {
     return new Object() { public String toString() { return item; } };
   }
 

Parameters:
anObject - the Object to add to the list
See Also:
MutableComboBoxModel sample code for javax.swing.MutableComboBoxModel definition code for javax.swing.MutableComboBoxModel

insertItemAt sample code for javax.swing.JComboBox.insertItemAt(java.lang.Object, int) definition code for javax.swing.JComboBox.insertItemAt(java.lang.Object, int)

public void insertItemAt(Object sample code for java.lang.Object definition code for java.lang.Object  anObject,
                         int index)
Inserts an item into the item list at a given index. This method works only if the JComboBox uses a mutable data model.

Parameters:
anObject - the Object to add to the list
index - an integer specifying the position at which to add the item
See Also:
MutableComboBoxModel sample code for javax.swing.MutableComboBoxModel definition code for javax.swing.MutableComboBoxModel

removeItem sample code for javax.swing.JComboBox.removeItem(java.lang.Object) definition code for javax.swing.JComboBox.removeItem(java.lang.Object)

public void removeItem(Object sample code for java.lang.Object definition code for java.lang.Object  anObject)
Removes an item from the item list. This method works only if the JComboBox uses a mutable data model.

Parameters:
anObject - the object to remove from the item list
See Also:
MutableComboBoxModel sample code for javax.swing.MutableComboBoxModel definition code for javax.swing.MutableComboBoxModel

removeItemAt sample code for javax.swing.JComboBox.removeItemAt(int) definition code for javax.swing.JComboBox.removeItemAt(int)

public void removeItemAt(int anIndex)
Removes the item at anIndex This method works only if the JComboBox uses a mutable data model.

Parameters:
anIndex - an int specifying the index of the item to remove, where 0 indicates the first item in the list
See Also:
MutableComboBoxModel sample code for javax.swing.MutableComboBoxModel definition code for javax.swing.MutableComboBoxModel

removeAllItems sample code for javax.swing.JComboBox.removeAllItems() definition code for javax.swing.JComboBox.removeAllItems()

public void removeAllItems()
Removes all items from the item list.


showPopup sample code for javax.swing.JComboBox.showPopup() definition code for javax.swing.JComboBox.showPopup()

public void showPopup()
Causes the combo box to display its popup window.

See Also:
setPopupVisible(boolean) sample code for javax.swing.JComboBox.setPopupVisible(boolean) definition code for javax.swing.JComboBox.setPopupVisible(boolean)

hidePopup sample code for javax.swing.JComboBox.hidePopup() definition code for javax.swing.JComboBox.hidePopup()

public void hidePopup()
Causes the combo box to close its popup window.

See Also:
setPopupVisible(boolean) sample code for javax.swing.JComboBox.setPopupVisible(boolean) definition code for javax.swing.JComboBox.setPopupVisible(boolean)

setPopupVisible sample code for javax.swing.JComboBox.setPopupVisible(boolean) definition code for javax.swing.JComboBox.setPopupVisible(boolean)

public void setPopupVisible(boolean v)
Sets the visibility of the popup.


isPopupVisible sample code for javax.swing.JComboBox.isPopupVisible() definition code for javax.swing.JComboBox.isPopupVisible()

public boolean isPopupVisible()
Determines the visibility of the popup.

Returns:
true if the popup is visible, otherwise returns false

addItemListener sample code for javax.swing.JComboBox.addItemListener(java.awt.event.ItemListener) definition code for javax.swing.JComboBox.addItemListener(java.awt.event.ItemListener)

public void addItemListener(ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.ItemListener  aListener)
Adds an ItemListener.

aListener will receive one or two ItemEvents when the selected item changes.

Specified by:
addItemListener sample code for java.awt.ItemSelectable.addItemListener(java.awt.event.ItemListener) definition code for java.awt.ItemSelectable.addItemListener(java.awt.event.ItemListener) in interface ItemSelectable sample code for java.awt.ItemSelectable definition code for java.awt.ItemSelectable
Parameters:
aListener - the ItemListener that is to be notified
See Also:
setSelectedItem(java.lang.Object) sample code for javax.swing.JComboBox.setSelectedItem(java.lang.Object) definition code for javax.swing.JComboBox.setSelectedItem(java.lang.Object)

removeItemListener sample code for javax.swing.JComboBox.removeItemListener(java.awt.event.ItemListener) definition code for javax.swing.JComboBox.removeItemListener(java.awt.event.ItemListener)

public void removeItemListener(ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.ItemListener  aListener)
Removes an ItemListener.

Specified by:
removeItemListener sample code for java.awt.ItemSelectable.removeItemListener(java.awt.event.ItemListener) definition code for java.awt.ItemSelectable.removeItemListener(java.awt.event.ItemListener) in interface ItemSelectable sample code for java.awt.ItemSelectable definition code for java.awt.ItemSelectable
Parameters:
aListener - the ItemListener to remove
See Also:
ItemEvent sample code for java.awt.event.ItemEvent definition code for java.awt.event.ItemEvent

getItemListeners sample code for javax.swing.JComboBox.getItemListeners() definition code for javax.swing.JComboBox.getItemListeners()

public ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.ItemListener [] getItemListeners()
Returns an array of all the ItemListeners added to this JComboBox with addItemListener().

Returns:
all of the ItemListeners added or an empty array if no listeners have been added
Since:
1.4

addActionListener sample code for javax.swing.JComboBox.addActionListener(java.awt.event.ActionListener) definition code for javax.swing.JComboBox.addActionListener(java.awt.event.ActionListener)

public void addActionListener(ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener  l)
Adds an ActionListener.

The ActionListener will receive an ActionEvent when a selection has been made. If the combo box is editable, then an ActionEvent will be fired when editing has stopped.

Parameters:
l - the ActionListener that is to be notified
See Also:
setSelectedItem(java.lang.Object) sample code for javax.swing.JComboBox.setSelectedItem(java.lang.Object) definition code for javax.swing.JComboBox.setSelectedItem(java.lang.Object)

removeActionListener sample code for javax.swing.JComboBox.removeActionListener(java.awt.event.ActionListener) definition code for javax.swing.JComboBox.removeActionListener(java.awt.event.ActionListener)

public void removeActionListener(ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener  l)
Removes an ActionListener.

Parameters:
l - the ActionListener to remove

getActionListeners sample code for javax.swing.JComboBox.getActionListeners() definition code for javax.swing.JComboBox.getActionListeners()

public ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener [] getActionListeners()
Returns an array of all the ActionListeners added to this JComboBox with addActionListener().

Returns:
all of the ActionListeners added or an empty array if no listeners have been added
Since:
1.4

addPopupMenuListener sample code for javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener) definition code for javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener)

public void addPopupMenuListener(PopupMenuListener sample code for javax.swing.event.PopupMenuListener definition code for javax.swing.event.PopupMenuListener  l)
Adds a PopupMenu listener which will listen to notification messages from the popup portion of the combo box.

For all standard look and feels shipped with Java 2, the popup list portion of combo box is implemented as a JPopupMenu. A custom look and feel may not implement it this way and will therefore not receive the notification.

Parameters:
l - the PopupMenuListener to add
Since:
1.4

removePopupMenuListener sample code for javax.swing.JComboBox.removePopupMenuListener(javax.swing.event.PopupMenuListener) definition code for javax.swing.JComboBox.removePopupMenuListener(javax.swing.event.PopupMenuListener)

public void removePopupMenuListener(PopupMenuListener sample code for javax.swing.event.PopupMenuListener definition code for javax.swing.event.PopupMenuListener  l)
Removes a PopupMenuListener.

Parameters:
l - the PopupMenuListener to remove
Since:
1.4
See Also:
addPopupMenuListener(javax.swing.event.PopupMenuListener) sample code for javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener) definition code for javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener)

getPopupMenuListeners sample code for javax.swing.JComboBox.getPopupMenuListeners() definition code for javax.swing.JComboBox.getPopupMenuListeners()

public PopupMenuListener sample code for javax.swing.event.PopupMenuListener definition code for javax.swing.event.PopupMenuListener [] getPopupMenuListeners()
Returns an array of all the PopupMenuListeners added to this JComboBox with addPopupMenuListener().

Returns:
all of the PopupMenuListeners added or an empty array if no listeners have been added
Since:
1.4

firePopupMenuWillBecomeVisible sample code for javax.swing.JComboBox.firePopupMenuWillBecomeVisible() definition code for javax.swing.JComboBox.firePopupMenuWillBecomeVisible()

public void firePopupMenuWillBecomeVisible()
Notifies PopupMenuListeners that the popup portion of the combo box will become visible.

This method is public but should not be called by anything other than the UI delegate.

Since:
1.4
See Also:
addPopupMenuListener(javax.swing.event.PopupMenuListener) sample code for javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener) definition code for javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener)

firePopupMenuWillBecomeInvisible sample code for javax.swing.JComboBox.firePopupMenuWillBecomeInvisible() definition code for javax.swing.JComboBox.firePopupMenuWillBecomeInvisible()

public void firePopupMenuWillBecomeInvisible()
Notifies PopupMenuListeners that the popup portion of the combo box has become invisible.

This method is public but should not be called by anything other than the UI delegate.

Since:
1.4
See Also:
addPopupMenuListener(javax.swing.event.PopupMenuListener) sample code for javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener) definition code for javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener)

firePopupMenuCanceled sample code for javax.swing.JComboBox.firePopupMenuCanceled() definition code for javax.swing.JComboBox.firePopupMenuCanceled()

public void firePopupMenuCanceled()
Notifies PopupMenuListeners that the popup portion of the combo box has been canceled.

This method is public but should not be called by anything other than the UI delegate.

Since:
1.4
See Also:
addPopupMenuListener(javax.swing.event.PopupMenuListener) sample code for javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener) definition code for javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener)

setActionCommand sample code for javax.swing.JComboBox.setActionCommand(java.lang.String) definition code for javax.swing.JComboBox.setActionCommand(java.lang.String)

public void setActionCommand(String sample code for java.lang.String definition code for java.lang.String  aCommand)
Sets the action command that should be included in the event sent to action listeners.

Parameters:
aCommand - a string containing the "command" that is sent to action listeners; the same listener can then do different things depending on the command it receives

getActionCommand sample code for javax.swing.JComboBox.getActionCommand() definition code for javax.swing.JComboBox.getActionCommand()

public String sample code for java.lang.String definition code for java.lang.String  getActionCommand()
Returns the action command that is included in the event sent to action listeners.

Returns:
the string containing the "command" that is sent to action listeners.

setAction sample code for javax.swing.JComboBox.setAction(javax.swing.Action) definition code for javax.swing.JComboBox.setAction(javax.swing.Action)

public void setAction(Action sample code for javax.swing.Action definition code for javax.swing.Action  a)
Sets the Action for the ActionEvent source. The new Action replaces any previously set Action but does not affect ActionListeners independently added with addActionListener. If the Action is already a registered ActionListener for the ActionEvent source, it is not re-registered.

A side-effect of setting the Action is that the ActionEvent source's properties are immedately set from the values in the Action (performed by the method configurePropertiesFromAction) and subsequently updated as the Action's properties change (via a PropertyChangeListener created by the method createActionPropertyChangeListener.

Parameters:
a - the Action for the JComboBox, or null.
Since:
1.3
See Also:
Action sample code for javax.swing.Action definition code for javax.swing.Action , getAction() sample code for javax.swing.JComboBox.getAction() definition code for javax.swing.JComboBox.getAction() , configurePropertiesFromAction(javax.swing.Action) sample code for javax.swing.JComboBox.configurePropertiesFromAction(javax.swing.Action) definition code for javax.swing.JComboBox.configurePropertiesFromAction(javax.swing.Action) , createActionPropertyChangeListener(javax.swing.Action) sample code for javax.swing.JComboBox.createActionPropertyChangeListener(javax.swing.Action) definition code for javax.swing.JComboBox.createActionPropertyChangeListener(javax.swing.Action)

getAction sample code for javax.swing.JComboBox.getAction() definition code for javax.swing.JComboBox.getAction()

public Action sample code for javax.swing.Action definition code for javax.swing.Action  getAction()
Returns the currently set Action for this ActionEvent source, or null if no Action is set.

Returns:
the Action for this ActionEvent source; or null
Since:
1.3
See Also:
Action sample code for javax.swing.Action definition code for javax.swing.Action , setAction(javax.swing.Action) sample code for javax.swing.JComboBox.setAction(javax.swing.Action) definition code for javax.swing.JComboBox.setAction(javax.swing.Action)

configurePropertiesFromAction sample code for javax.swing.JComboBox.configurePropertiesFromAction(javax.swing.Action) definition code for javax.swing.JComboBox.configurePropertiesFromAction(javax.swing.Action)

protected void configurePropertiesFromAction(Action sample code for javax.swing.Action definition code for javax.swing.Action  a)
Factory method which sets the ActionEvent source's properties according to values from the Action instance. The properties which are set may differ for subclasses. By default, the properties which get set are Enabled and ToolTipText.

Parameters:
a - the Action from which to get the properties, or null
Since:
1.3
See Also:
Action sample code for javax.swing.Action definition code for javax.swing.Action , setAction(javax.swing.Action) sample code for javax.swing.JComboBox.setAction(javax.swing.Action) definition code for javax.swing.JComboBox.setAction(javax.swing.Action)

createActionPropertyChangeListener sample code for javax.swing.JComboBox.createActionPropertyChangeListener(javax.swing.Action) definition code for javax.swing.JComboBox.createActionPropertyChangeListener(javax.swing.Action)

protected PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  createActionPropertyChangeListener(Action sample code for javax.swing.Action definition code for javax.swing.Action  a)
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance. Subclasses may override this in order to provide their own PropertyChangeListener if the set of properties which should be kept up to date differs from the default properties (Text, Icon, Enabled, ToolTipText). Note that PropertyChangeListeners should avoid holding strong references to the ActionEvent source, as this may hinder garbage collection of the ActionEvent source and all components in its containment hierarchy.

Since:
1.3
See Also:
Action sample code for javax.swing.Action definition code for javax.swing.Action , setAction(javax.swing.Action) sample code for javax.swing.JComboBox.setAction(javax.swing.Action) definition code for javax.swing.JComboBox.setAction(javax.swing.Action)

fireItemStateChanged sample code for javax.swing.JComboBox.fireItemStateChanged(java.awt.event.ItemEvent) definition code for javax.swing.JComboBox.fireItemStateChanged(java.awt.event.ItemEvent)

protected void fireItemStateChanged(ItemEvent sample code for java.awt.event.ItemEvent definition code for java.awt.event.ItemEvent  e)
Notifies all listeners that have registered interest for notification on this event type.

Parameters:
e - the event of interest
See Also:
EventListenerList sample code for javax.swing.event.EventListenerList definition code for javax.swing.event.EventListenerList

fireActionEvent sample code for javax.swing.JComboBox.fireActionEvent() definition code for javax.swing.JComboBox.fireActionEvent()

protected void fireActionEvent()
Notifies all listeners that have registered interest for notification on this event type.

See Also:
EventListenerList sample code for javax.swing.event.EventListenerList definition code for javax.swing.event.EventListenerList

selectedItemChanged sample code for javax.swing.JComboBox.selectedItemChanged() definition code for javax.swing.JComboBox.selectedItemChanged()

protected void selectedItemChanged()
This protected method is implementation specific. Do not access directly or override.


getSelectedObjects sample code for javax.swing.JComboBox.getSelectedObjects() definition code for javax.swing.JComboBox.getSelectedObjects()

public Object sample code for java.lang.Object definition code for java.lang.Object [] getSelectedObjects()
Returns an array containing the selected item. This method is implemented for compatibility with ItemSelectable.

Specified by:
getSelectedObjects sample code for java.awt.ItemSelectable.getSelectedObjects() definition code for java.awt.ItemSelectable.getSelectedObjects() in interface ItemSelectable sample code for java.awt.ItemSelectable definition code for java.awt.ItemSelectable
Returns:
an array of Objects containing one element -- the selected item

actionPerformed sample code for javax.swing.JComboBox.actionPerformed(java.awt.event.ActionEvent) definition code for javax.swing.JComboBox.actionPerformed(java.awt.event.ActionEvent)

public void actionPerformed(ActionEvent sample code for java.awt.event.ActionEvent definition code for java.awt.event.ActionEvent  e)
This method is public as an implementation side effect. do not call or override.

Specified by:
actionPerformed sample code for java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent) definition code for java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent) in interface ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener

contentsChanged sample code for javax.swing.JComboBox.contentsChanged(javax.swing.event.ListDataEvent) definition code for javax.swing.JComboBox.contentsChanged(javax.swing.event.ListDataEvent)

public void contentsChanged(ListDataEvent sample code for javax.swing.event.ListDataEvent definition code for javax.swing.event.ListDataEvent  e)
This method is public as an implementation side effect. do not call or override.

Specified by:
contentsChanged sample code for javax.swing.event.ListDataListener.contentsChanged(javax.swing.event.ListDataEvent) definition code for javax.swing.event.ListDataListener.contentsChanged(javax.swing.event.ListDataEvent) in interface ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener
Parameters:
e - a ListDataEvent encapsulating the event information

intervalAdded sample code for javax.swing.JComboBox.intervalAdded(javax.swing.event.ListDataEvent) definition code for javax.swing.JComboBox.intervalAdded(javax.swing.event.ListDataEvent)

public void intervalAdded(ListDataEvent sample code for javax.swing.event.ListDataEvent definition code for javax.swing.event.ListDataEvent  e)
This method is public as an implementation side effect. do not call or override.

Specified by:
intervalAdded sample code for javax.swing.event.ListDataListener.intervalAdded(javax.swing.event.ListDataEvent) definition code for javax.swing.event.ListDataListener.intervalAdded(javax.swing.event.ListDataEvent) in interface ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener
Parameters:
e - a ListDataEvent encapsulating the event information

intervalRemoved sample code for javax.swing.JComboBox.intervalRemoved(javax.swing.event.ListDataEvent) definition code for javax.swing.JComboBox.intervalRemoved(javax.swing.event.ListDataEvent)

public void intervalRemoved(ListDataEvent sample code for javax.swing.event.ListDataEvent definition code for javax.swing.event.ListDataEvent  e)
This method is public as an implementation side effect. do not call or override.

Specified by:
intervalRemoved sample code for javax.swing.event.ListDataListener.intervalRemoved(javax.swing.event.ListDataEvent) definition code for javax.swing.event.ListDataListener.intervalRemoved(javax.swing.event.ListDataEvent) in interface ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener
Parameters:
e - a ListDataEvent encapsulating the event information

selectWithKeyChar sample code for javax.swing.JComboBox.selectWithKeyChar(char) definition code for javax.swing.JComboBox.selectWithKeyChar(char)

public boolean selectWithKeyChar(char keyChar)
Selects the list item that corresponds to the specified keyboard character and returns true, if there is an item corresponding to that character. Otherwise, returns false.

Parameters:
keyChar - a char, typically this is a keyboard key typed by the user

setEnabled sample code for javax.swing.JComboBox.setEnabled(boolean) definition code for javax.swing.JComboBox.setEnabled(boolean)

public void setEnabled(boolean b)
Enables the combo box so that items can be selected. When the combo box is disabled, items cannot be selected and values cannot be typed into its field (if it is editable).

Overrides:
setEnabled sample code for javax.swing.JComponent.setEnabled(boolean) definition code for javax.swing.JComponent.setEnabled(boolean) in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Parameters:
b - a boolean value, where true enables the component and false disables it
See Also:
Component.isEnabled() sample code for java.awt.Component.isEnabled() definition code for java.awt.Component.isEnabled() , Component.isLightweight() sample code for java.awt.Component.isLightweight() definition code for java.awt.Component.isLightweight()

configureEditor sample code for javax.swing.JComboBox.configureEditor(javax.swing.ComboBoxEditor, java.lang.Object) definition code for javax.swing.JComboBox.configureEditor(javax.swing.ComboBoxEditor, java.lang.Object)

public void configureEditor(ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor  anEditor,
                            Object sample code for java.lang.Object definition code for java.lang.Object  anItem)
Initializes the editor with the specified item.

Parameters:
anEditor - the ComboBoxEditor that displays the list item in the combo box field and allows it to be edited
anItem - the object to display and edit in the field

processKeyEvent sample code for javax.swing.JComboBox.processKeyEvent(java.awt.event.KeyEvent) definition code for javax.swing.JComboBox.processKeyEvent(java.awt.event.KeyEvent)

public void processKeyEvent(KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent  e)
Handles KeyEvents, looking for the Tab key. If the Tab key is found, the popup window is closed.

Overrides:
processKeyEvent sample code for javax.swing.JComponent.processKeyEvent(java.awt.event.KeyEvent) definition code for javax.swing.JComponent.processKeyEvent(java.awt.event.KeyEvent) in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Parameters:
e - the KeyEvent containing the keyboard key that was pressed
See Also:
KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent , KeyListener sample code for java.awt.event.KeyListener definition code for java.awt.event.KeyListener , KeyboardFocusManager sample code for java.awt.KeyboardFocusManager definition code for java.awt.KeyboardFocusManager , DefaultKeyboardFocusManager sample code for java.awt.DefaultKeyboardFocusManager definition code for java.awt.DefaultKeyboardFocusManager , Component.processEvent(java.awt.AWTEvent) sample code for java.awt.Component.processEvent(java.awt.AWTEvent) definition code for java.awt.Component.processEvent(java.awt.AWTEvent) , Component.dispatchEvent(java.awt.AWTEvent) sample code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) , Component.addKeyListener(java.awt.event.KeyListener) sample code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) , Component.enableEvents(long) sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long) , Component.isShowing() sample code for java.awt.Component.isShowing() definition code for java.awt.Component.isShowing()

setKeySelectionManager sample code for javax.swing.JComboBox.setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager) definition code for javax.swing.JComboBox.setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager)

public void setKeySelectionManager(JComboBox.KeySelectionManager sample code for javax.swing.JComboBox.KeySelectionManager definition code for javax.swing.JComboBox.KeySelectionManager  aManager)
Sets the object that translates a keyboard character into a list selection. Typically, the first selection with a matching first character becomes the selected item.


getKeySelectionManager sample code for javax.swing.JComboBox.getKeySelectionManager() definition code for javax.swing.JComboBox.getKeySelectionManager()

public JComboBox.KeySelectionManager sample code for javax.swing.JComboBox.KeySelectionManager definition code for javax.swing.JComboBox.KeySelectionManager  getKeySelectionManager()
Returns the list's key-selection manager.

Returns:
the KeySelectionManager currently in use

getItemCount sample code for javax.swing.JComboBox.getItemCount() definition code for javax.swing.JComboBox.getItemCount()

public int getItemCount()
Returns the number of items in the list.

Returns:
an integer equal to the number of items in the list

getItemAt sample code for javax.swing.JComboBox.getItemAt(int) definition code for javax.swing.JComboBox.getItemAt(int)

public Object sample code for java.lang.Object definition code for java.lang.Object  getItemAt(int index)
Returns the list item at the specified index. If index is out of range (less than zero or greater than or equal to size) it will return null.

Parameters:
index - an integer indicating the list position, where the first item starts at zero
Returns:
the Object at that list position; or null if out of range

createDefaultKeySelectionManager sample code for javax.swing.JComboBox.createDefaultKeySelectionManager() definition code for javax.swing.JComboBox.createDefaultKeySelectionManager()

protected JComboBox.KeySelectionManager sample code for javax.swing.JComboBox.KeySelectionManager definition code for javax.swing.JComboBox.KeySelectionManager  createDefaultKeySelectionManager()
Returns an instance of the default key-selection manager.

Returns:
the KeySelectionManager currently used by the list
See Also:
setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager) sample code for javax.swing.JComboBox.setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager) definition code for javax.swing.JComboBox.setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager)

paramString sample code for javax.swing.JComboBox.paramString() definition code for javax.swing.JComboBox.paramString()

protected String sample code for java.lang.String definition code for java.lang.String  paramString()
Returns a string representation of this JComboBox. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overrides:
paramString sample code for javax.swing.JComponent.paramString() definition code for javax.swing.JComponent.paramString() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Returns:
a string representation of this JComboBox

getAccessibleContext sample code for javax.swing.JComboBox.getAccessibleContext() definition code for javax.swing.JComboBox.getAccessibleContext()

public AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext  getAccessibleContext()
Gets the AccessibleContext associated with this JComboBox. For combo boxes, the AccessibleContext takes the form of an AccessibleJComboBox. A new AccessibleJComboBox instance is created if necessary.

Specified by:
getAccessibleContext sample code for javax.accessibility.Accessible.getAccessibleContext() definition code for javax.accessibility.Accessible.getAccessibleContext() in interface Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible
Overrides:
getAccessibleContext sample code for javax.swing.JComponent.getAccessibleContext() definition code for javax.swing.JComponent.getAccessibleContext() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Returns:
an AccessibleJComboBox that serves as the AccessibleContext of this JComboBox