JLabel – Show longer text as multiple lines?
Just another example, showing that, with the right layout manager, text wrapped in HTML tags will automatically wrap to the available space… public class TestHTMLLabel { public static void main(String[] args) { new TestHTMLLabel(); } public TestHTMLLabel() { EventQueue.invokeLater(new Runnable() { @Override public void run() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | … Read more