Example usage for javax.swing.plaf.basic BasicComboBoxEditor BasicComboBoxEditor

List of usage examples for javax.swing.plaf.basic BasicComboBoxEditor BasicComboBoxEditor

Introduction

In this page you can find the example usage for javax.swing.plaf.basic BasicComboBoxEditor BasicComboBoxEditor.

Prototype

public BasicComboBoxEditor() 

Source Link

Document

Constructs a new instance of BasicComboBoxEditor .

Usage

From source file:Main.java

public AutoCompleteComboBox(final Object items[]) {
    super(items);
    this.setEditor(new BasicComboBoxEditor());
    this.setEditable(true);
}

From source file:edu.ku.brc.af.ui.db.JEditComboBox.java

/**
 * Initializes the combobox to enable the typing of values 
 * @param makeEditable indicates to make it an editable combobox
 *//*from  ww  w .ja  va 2  s.  co  m*/
public void init(final boolean makeEditable) {
    if (makeEditable && !this.isEditable) {
        this.setEditor(new BasicComboBoxEditor());
        this.setEditable(true);
        setSelectedIndex(-1);
    }
}