This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes Each Item With Different text Color in a combox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Each Item With Different text Color in a combox" Watch "Each Item With Different text Color in a combox" New topic
Author

Each Item With Different text Color in a combox

Muhammad Ahsan Jamshaid
Ranch Hand

Joined: Jun 01, 2006
Posts: 59
HI..
i am Using combobox for the selecting font color Selection... i want to display each Color in combobox with same the font color as its name... like Pink Text should be in Pink Color and Red Should be displayed with RED with Red Text Color in the Combobox...
Any Idea or Clue...... Surely awaiting some good solution..
--Jamshaid..


--Ahsan Jamshaid... SCJP 5(80%)
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
this might be one way

Muhammad Ahsan Jamshaid
Ranch Hand

Joined: Jun 01, 2006
Posts: 59
Thanks... It Worked......
--Jamhaid..
Muhammad Ahsan Jamshaid
Ranch Hand

Joined: Jun 01, 2006
Posts: 59
My concepts regarding Playing with renderer class is week.. can any one refer me a good link or notes to study...

--Jamshaid..
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
doesn't look like there's a lot, but this has some info.
some of the examples on the page might be worth going through.

http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html#renderer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Each Item With Different text Color in a combox