Wednesday, September 10, 2008

Word wrapping with a JLabel

I am sure a lot of you already know about this, but it took me a while to find this in Google-land, so I thought I'd share it here.

If you want to create a JLabel that does word wrap dynamically, so that if you resize the window the label "does the right thing", then wrap the label text with <HTML> and </HTML>

No comments: