Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages
Started by Daniel Mark
Wed, 25 Jan 2006 15:57
How to color the list under JComboBox?
Author: Daniel Mark
Date: Wed, 25 Jan 2006 15:57
Date: Wed, 25 Jan 2006 15:57
16 lines
1147 bytes
1147 bytes
Hello all: Is there anyway I could color the text in list under JComboBox? For example: JComboBox has three items Item1 Item2 Item3 I would like to display Item1 as red, item2 as blue and item3 as green. thank you -Daniel
Re: How to color the list under JComboBox?
Author: Doychin Bondzhev
Date: Wed, 25 Jan 2006 16:06
Date: Wed, 25 Jan 2006 16:06
23 lines
1310 bytes
1310 bytes
You should assign custom item renderer that will display list items in different colors. Doychin Daniel Mark wrote: > Hello all: > > Is there anyway I could color the text in list under JComboBox? > > For example: > JComboBox has three items > > Item1 > Item2 > Item3 > > I would like to display Item1 as red, item2 as blue and item3 as green. > > > thank you > -Daniel > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads