|Re: how to sort ComboBoxCellEditor in a table [message #651937 is a reply to message #651673]
||Wed, 02 February 2011 01:51
| Daniel KrÃ¼gler
Registered: July 2009
On 2011-02-01 09:32, raj wrote:|
> How to Sort ComboBoxCellEditor Colum in a table
You need to sort it's items that you get via getItems().
It might be worth to add one undocumented characteristics:
ComboBoxCellEditor does not clone the items when accepting them nor does
it do so when returning them, this means you can invoke
Arrays.sort with or without your defined Comparator directly on the
return value of getItems() and invoke setItems() again which will
repopulate the CelllEditor with the sorted items.
HTH & Greetings from Bremen,
Powered by FUDForum
. Page generated in 0.01586 seconds