|
Java™ by example!
|
|
|
How do I create a multi-line text JLabel?
The easiest way is to hardcode HTML inside your JLabel text. JLabel has the functionality to render HTML. Another way is to write a custom Jlabel UI for your l&f that is able to understand escape sequences like \n. Main.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|