Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8123180

Rightmost TableView Header still displays Graphic, even when hidden

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • javafx
    • 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.

            jgiles Jonathan Giles
            cbanackjfx Cory Banack (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: