|
-
November 1st, 1999, 09:01 PM
#1
make a jlabel span multiple lines ?
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
-
November 1st, 1999, 09:37 PM
#2
Re: make a jlabel span multiple lines ?
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
-
November 2nd, 1999, 01:09 AM
#3
Re: make a jlabel span multiple lines ?
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...
-
November 2nd, 1999, 10:43 PM
#4
can you give me a short example ?
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
-
November 3rd, 1999, 01:18 AM
#5
Re: can you give me a short example ?
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...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|