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: column header text alignment?

892635Oct 12 2011 — edited Oct 13 2011
How can I change the text alignment of a TableView column caption/header? I'd like some of my column headers to be right aligned for example?

It works for regular table cells when I change f.i. the css of the custom DataFX MoneyTableCell cell:
.money-cell {
   -fx-alignment: TOP_RIGHT;
 }
but it won't work for the ".table-view .column-header" style of the standard TableView:
.table-view .column-header,
.table-view .filler,
.table-view .column-drag-header {
    -fx-alignment: TOP_RIGHT;
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2011
Added on Oct 12 2011
3 comments
3,659 views