Skip to main content

Creating non-strict autocomplete JComboBox

1 reply [Last post]
ntraykov
Offline
Joined: 2011-01-21
Points: 0

Hi, could you please tell me how to create a non-strict autocomplete JComboBox, because I've seen swingxset.jnlp (SwingLabs demos), and there the source code for strict, and non-strict autocomplete is the same?

Cheers
nIKO

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miguelm
Offline
Joined: 2005-03-17
Points: 0

nIKO,
String vs. non-strict in a JComboBox is determined by the JComboBox API, not by AutoComplete. You make the JComboBox non-strict by setting editable to true. Do this before calling AutoCompleteDecorator.decorate().