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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JList question 1

Status
Not open for further replies.

mstelmac

Technical User
Oct 22, 2003
53
0
0
US
Hello everyone. Can anyone give me a hint on how to underline the values in a Jlist? I was thinking of writing a renderer (if it's possible) but wanted to see if anyone had a better idea.

v/r,
Matt
 
Use html to define the layout.
Thats the smallest solution I know:
Code:
	al = new Vector <String> ();
	al.add ("<html><u>Cat</u></html>");
	al.add ("<html><b>Bear</b></html>");
	al.add ("<html><i>Gnu</i></html>");
	jta = new JList (al);
(That's not a suggestion to use 'Vector' - it was just the fastest possibility to modify my template.)

seeking a job as java-programmer in Berlin:
 
Thats a great idea. Thank you very much for your help.
-Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top