can i make a jlabel that span multiple lines ?
it displays lines on top of other lines.
that's all.
thanks in advance.
http://members.xoom.com/lookads
Printable View
can i make a jlabel that span multiple lines ?
it displays lines on top of other lines.
that's all.
thanks in advance.
http://members.xoom.com/lookads
There is a article on this site I think at
http://codeguru.developer.com/java/swing
This is a enhanced JLabel component which shows label on multiple lines. See if its useful for u.
- UnicMan
http://members.tripod.com/unicman
U have to use Swing1.1.1 for this where u can use html statements for your label.
Use
to achieve your multi line label.
regards,
arun...
can you give me a short example ?
how do i put html in my jlabel.
i thought jlabel only displays a single line of code ?
thanks
http://members.xoom.com/lookads
Hi,
Here it is. U have to use Swing1.1.1 for this case. Because only this supports HTML.
String htmlText = "<html>MultiLine JLabel
one
two";
JLabel myLabel = new JLabel(htmlText);
I have used "break" between "JLabel" and "one" as well as between "one" and "two". The html equivalent for "break"
is not coming in the preview. So I have given the explanation as above.
It supports all valid html tags too. The JVM constructs a lightweight HTML document, when the the String for the JLabel
begins with "<html>"
Hope will help u.
regards,
arun...