File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT / JFace and the fly likes JList Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "JList" Watch "JList" New topic
Author

JList

Mohit Maheshwari
Greenhorn

Joined: Dec 07, 2001
Posts: 2
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

Joined: Oct 18, 2000
Posts: 4120

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


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
 
subject: JList
 
Threads others viewed
JList + Vector
Adding new element to a Jlist
ObjectOutputStream + Vector
Question about JList
Jlist and Jtextfield
developer file tools