-
Bug
-
Resolution: Fixed
-
P4
-
8
-
Using build 92, on Windows 8
Run the following example code, which creates an empty table with two columns:
public class TableGraphicBug extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("Table Graphic Bug Demo");
TableView table = new TableView();
TableColumn column2 = new TableColumn("Column 2");
column2.setGraphic( new Circle(8) );
//column2.setVisible( false );
table.getColumns().setAll( new TableColumn("Column 1"), column2);
StackPane root = new StackPane();
root.getChildren().add(table);
primaryStage.setScene(new Scene(root, 300, 50));
primaryStage.show();
}
}
Note that there is a graphic (a black circle) in the header of the second column.
Close the program, then uncomment this line:
//column2.setVisible( false );
Run the program again. Notice that the graphic for column 2 is still visible, even though column 2 itself is not! Interestingly, this only seems to happen if the graphic is in the last (rightmost) column in the table.
public class TableGraphicBug extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("Table Graphic Bug Demo");
TableView table = new TableView();
TableColumn column2 = new TableColumn("Column 2");
column2.setGraphic( new Circle(8) );
//column2.setVisible( false );
table.getColumns().setAll( new TableColumn("Column 1"), column2);
StackPane root = new StackPane();
root.getChildren().add(table);
primaryStage.setScene(new Scene(root, 300, 50));
primaryStage.show();
}
}
Note that there is a graphic (a black circle) in the header of the second column.
Close the program, then uncomment this line:
//column2.setVisible( false );
Run the program again. Notice that the graphic for column 2 is still visible, even though column 2 itself is not! Interestingly, this only seems to happen if the graphic is in the last (rightmost) column in the table.