Module java.desktop

Class BasicComboBoxEditor

java.lang.Object
javax.swing.plaf.basic.BasicComboBoxEditor
All Implemented Interfaces:
FocusListener, EventListener, ComboBoxEditor
Direct Known Subclasses:
BasicComboBoxEditor.UIResource, MetalComboBoxEditor

public class BasicComboBoxEditor
extends Object
implements ComboBoxEditor, FocusListener
The default editor for editable combo boxes. The editor is implemented as a JTextField.
  • Field Details

    • editor

      protected JTextField editor
      An instance of JTextField.
  • Constructor Details

    • BasicComboBoxEditor

      public BasicComboBoxEditor()
      Constructs a new instance of BasicComboBoxEditor.
  • Method Details

    • createEditorComponent

      protected JTextField createEditorComponent()
      Creates the internal editor component. Override this to provide a custom implementation.
      Returns:
      a new editor component
      Since:
      1.6
    • setItem

      public void setItem​(Object anObject)
      Sets the item that should be edited.
      Specified by:
      setItem in interface ComboBoxEditor
      Parameters:
      anObject - the displayed value of the editor