• Post Reply Bookmark Topic Watch Topic
  • New Topic

JList  RSS feed

 
Mohit Maheshwari
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a JLIst, i am filling it with a vector. The vector elements are structures( having a string and a boolean value). Based on the parameters of the structure i had to show the elements in the list as bold or normal( or just change the color).
Can you please help me out.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll probably want to make a new ListCellRenderer component that changes color and font based on the attributes specified in it's value parameter... something like the following...



-Nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!