Auto Adjust JTable Row Height

Now this, is the best code snippet I found in Java that can auto adjust the JTable row height regardless what kind of renderer component is used.

I had been using some short code snippet that sets a JTextPane or JEditorPane content, then getting the height. However, when my content was full of HTML tags, the height returned really messed my JTable.

This code I found in Stack Overflow by user camickr really is the best solution for auto adjusting all rows heights of a JTable based on content.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *