In Swing
is there any way to have two colors for single option? I mean, if I have a option
, say Show only cities [Alt+C]
in JComboBox
, I want Show only cities
text in one color and [Alt+C]
(hotkey) in another color. Similarly, I have JList
, Which contains a list of string items. I want to differentiate one from other by color.
In short,
- How to design two colored
JComboBox
option. - How to differentiate
JList
objects with color.
Thanks.