JLablel with more than one line
how can i make many lines in a JLable ?
i tried to use /n but it doesn't work
any ideas :confused:
Re: JLablel with more than one line
You need to use html tags. For example:
Code java:
JLabel text = new JLabel("<html>Worg<br>input!</html>"); //I'm not sure if the new line tag is <br> or </br>
That should make a JLabel with the text on two different lines.
Re: JLablel with more than one line
i haven't seen something like this before but it works thanks
Re: JLablel with more than one line
Quote:
Originally Posted by
keep smiling
i tried to use /n but it doesn't work
If anything it would have been \n.
Quote:
Originally Posted by
aussiemcgr
//I'm not sure if the new line tag is <br> or </br>
It's <br>, or more correctly, <br/>. HTML br tag