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.
You could try with
JListinstead (see How to Use Lists) usingSINGLE_SELECTION_INTERVALorMULTIPLE_SELECTION_INTERVALmode to achieve your target.