Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Wrappable text in a TableView

user2932712Apr 22 2012 — edited Apr 30 2012
I have a TableView where certain entries contain very long strings (amino acid and nucleotide sequences). I would like the long strings to wrap to the size of the column they are in -- so if the column a long string is in is 100 pixels wide, then the string wraps to 100 pixels, turning into a multi-line label.

I have tried everything to get this to work. Calling the table cell wrapText(true), creating my own custom cell with a wrapping label, etc. But no luck -- somehow the table row height stays the same.

Does anyone have an example of a table in which the cells size to the height of their content? And hence in which a long string can wrap over multiple lines.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 28 2012
Added on Apr 22 2012
9 comments
5,702 views