Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JList Fonts

Status
Not open for further replies.

fatcodeguy

Programmer
Feb 25, 2002
281
CA
How do I set the font of some items in a JList (some bold, some plain)? I think I use cell renderer, but how does that work? Thanks
 

Not sure about cell rendering, but does this help ...

Font font = new Font("Helvetica", Font.BOLD, 16);
JList jl = new JList();
jl.setFont(font);

Sorry if its not what you are looking for !

Ben
 
Thanks, but this changes the whole list, I need to be able to change the font for only certain items
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top