Restrict number of lines in html JLabel

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-04-26T02:30:22Z Indexed on 2010/04/26 2:33 UTC
Read the original article Hit count: 284

Filed under:
|
|
|

I have a JLabel that needs to display some html-formatted text. However, I want to restrict this to being 4 lines long (and if so, provide a button to see everything).

So far, I've tried setting the maximum size manually or via a layout manager. However, both of these solutions can cause part of a line to be displayed.

© Stack Overflow or respective owner

Related posts about java

Related posts about jlabel