javajtableglazedlists

Wider autocomplete suggestions in JTable combobox using glazedlists


Is there any way that I can make the suggestions box wider without actually changing the width of that jtable column? I want to make the suggestion box wider than the actual jcombobox.


Solution

  • The standard way is to use the JComboBox.setPrototypeDisplayValue() method; ideally you'd pass in the longest item so that the combobox can set a good default width.

    This is briefly touched upon in the GlazedLists Developer Tutorials; see "AutoCompleteSupport Screencast" for the walkthrough.