A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Swing / AWT / SWT
Author
How to wrap text in JLabel
shukla raghav
Ranch Hand
Joined: Aug 03, 2008
Posts: 184
posted
Feb 13, 2010 22:28:49
0
How to wrap text in
JLabel
?
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
Feb 13, 2010 22:47:27
0
if you know where the wrap is, use html
new JLabel("<html>line1<br>line2</html>");
shukla raghav
Ranch Hand
Joined: Aug 03, 2008
Posts: 184
posted
Feb 13, 2010 23:16:46
0
This is not a webapp. Its a desktop application. not to be view on a browser. will html tags work <>
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
2
I like...
posted
Feb 13, 2010 23:38:26
0
If you look carefully, you will see that it's a Swing example and not a web example. As for "will it work", what happened when you tried it?
I agree. Here's the link:
http://aspose.com/file-tools
subject: How to wrap text in JLabel
Similar Threads
Resize width only?
JTable doubt
text wrap in combo box.
How To Make JLabel automatically wrap to next line
JLabel centered in a JPanel
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter