I recently picked up Swing while I was developing Tweeter!, a Java client for Twitter. A nifty little trick that I found out about was how to wrap the text inside a JLabel.
JLabels support HTML markup. So all you need to do is surround the text with HTML tags ( <html> and </html> ) and voila! The contents wrap around! If you need it to be centered, simply add a <center> tag. It's that simple!
JLabels support HTML markup. So all you need to do is surround the text with HTML tags ( <html> and </html> ) and voila! The contents wrap around! If you need it to be centered, simply add a <center> tag. It's that simple!

0 comments:
Post a Comment