This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JList - items in different color  RSS feed

 
Sri Rangan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to display the JList items in different colors.
I could change the background and foreground on selection of an item.
But how to display initially in different colors.
Thanks
Sri
 
Mark Bensing
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the ListCellRenderer interface.
Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!