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

Rightmost TableView Header still displays Graphic, even when hidden

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Environment:

      Using build 92, on Windows 8

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Due:
                Created:
                Updated:
                Resolved:
                Imported: