Is it possible to have a JTextField with a drop-down list similar to the implementations of search via different engines?
I'm trying to deliver table column filtration and addition/removal via a such a component.
Is it possible to have a JTextField with a drop-down list similar to the implementations of search via different engines?
I'm trying to deliver table column filtration and addition/removal via a such a component.
An editable JCombobox
has a JTextField
as editor, so that is very close to what you want. You can combine this with autocompletion functionality (e.g. by using SwingX which allows to decorate a combobox and making autocompletion a one-liner)
JComboBox
gives you the flexibility
of a TextField and a List
.
Eg:
JComboBox<String> combo = new JComboBox<String>();
combo.setEditable(true);
setEditable(true)
will make the JComboList behave editable like textfield.