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!

Tableview and dynamically adjusting row and columns sizes

Rafal ZApr 1 2014 — edited Apr 2 2014

Hallo,

     I was going to migrate my project to javafx8 (for now I'm using swing). What I need is a table component that is able to wrap text in cells, allows programmatically changing row heights and allows computing and setting the widths of columns. After 3 days od research (using Google) I achieved the 1. point, I can make table wrap text. To change measurements of row and column I need to modify css file for my project. CSS is nice, but the possibility to change the measuremnts programmatically is important too. In fact I can make table columns automatically adjust to width of data in column, but without having regard to data in column header, if I use another fontsize, the header will be truncated. To compute the length of rendered string I need to know the font used by component, but I couldn't find neither a getFont-metod nor a Font property. In CSS I can only set the font family.

     Is there a workaround for this issues, Are there another convenient methods to achieve these tasks?

with regards

Rafal Ziolkowski

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 30 2014
Added on Apr 1 2014
2 comments
2,120 views