TableView FXML problems

Daniel Opitz daniel at
Sun Dec 2 07:11:59 PST 2012


I'm currently trying to learn some FXML and have at least 4 problems 
with the TableView component:

1) TableView shows some strange behavior after maximizing the window:
and minimizing it afterwards:

When resizing (particularily making the window bigger) the unstyled 
table is visible too:

I set some some constraints on the columns and I am using the 
             <TableView fx:id="taskTable" prefHeight="-1.0" 
prefWidth="-1.0" VBox.vgrow="ALWAYS">
                     <placeholder><Label text="" /></placeholder>
fx:constant="CONSTRAINED_RESIZE_POLICY" /></columnResizePolicy>
                         <TableColumn text="Completed" minWidth="75" 
prefWidth="75" maxWidth="75" >
<cellValueFactory><PropertyValueFactory property="completed" 
                         <TableColumn text="Task">
<cellValueFactory><PropertyValueFactory property="name" 
                         <TableColumn text="Progress" minWidth="100" 
prefWidth="100" maxWidth="100">
<cellValueFactory><PropertyValueFactory property="progress" 
                         <FXCollections fx:factory="observableArrayList">
                             <Task completed="false" name="Random" 
progress="0" />
The TableView Control sits in a VBox which sits in the center of a 

2) I have found some code to hide the table header:

|Pane header = (Pane) table.lookup("TableHeaderRow");

but I don't know where I can call it. I have a controller for the Main 
Window and if I use the Initializable interface I obviously get 
NullPointerException, because the TableView isn't created yet.

3) Is it possible to remove the resize lines / column borders? I tried 
changing CSS of the column-resize-line substructure of the TableView, 
but with no success...

4) I haven't found anything reliable on the net: How can I set a 
Checkbox Cell Factory in the table using FXML? I did it earlier using 
DataFX cell factories, but only in pure Java.

Kind regards,
Daniel Opitz

More information about the openjfx-dev mailing list