Is it possible to create multiline label in WindowBuilder?
Methods below failed:
1) JLabel with \n
-s
2) JLabel with text, wrapper into <html>
and maximuSize
set
3) JTextPane with and withot <html>
Why???
Is it possible to create multiline label in WindowBuilder?
Methods below failed:
1) JLabel with \n
-s
2) JLabel with text, wrapper into <html>
and maximuSize
set
3) JTextPane with and withot <html>
Why???
If you want to display multiline text in a JLabel, use html tags like this:
JLabel label = new JLabel("<html>First line and maybe second line</html>");
If you want to be able to control the line-break, use standard html
tags:
JLabel label = new JLabel("<html>First line<br>Second line</html>");
. – KathyA. Jun 23 '14 at 16:24