I have a jComboBox with a few items. The goal is to add an option "All" so when the user select it all the items available would be selected.
Is it possible to do it with a jComboBox or I better use another jComponent (recommendations are welcome). It's required that it's a dropdown list (because it must fit inside a table row) so I guess it could be a menu with checkboxes or something similar.
NK
EDID: I've tried to put a fake object in the model which would be handled specifically (to get all other elements from the model) but it's really not a good idea as this fake object should implement a dozen of interfaces and it's really ugly.
It is possible with a JComboBox, however, you need to implement a Renderer and ActionListener for the JComboBox and keep track of the selected items. Example:
(it seems to work at first glance, but probably is littered with bugs ;-) )
Then you can use this multi-selection-thingy like this: