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

TableView doesn't dynamically add columns correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:
    • Environment:

      Mac OS X 10.5.8, Build 21 JavaFX EA

      Description

      The following code works

      TableView<String> v = new TableView<String>();
      Scene sx = new Scene(v, 300, 300);
      stage.setScene(sx);
      TableColumn<String> col = new TableColumn<String>();
      col.setText("XXXXX");
      v.getColumns().add(col);
      TableColumn<String> col1 = new TableColumn<String>();
      col1.setText("AAAA");
      col.getColumns().add(col1);
      TableColumn<String> col2 = new TableColumn<String>();
      col2.setText("BBBB");
      col.getColumns().add(col2);
      stage.setVisible(true);

      But the following code (which is the same code with the stage.setVisible() call moved), does not

      TableView<String> v = new TableView<String>();
      Scene sx = new Scene(v, 300, 300);
      stage.setScene(sx);
      stage.setVisible(true);
      TableColumn<String> col = new TableColumn<String>();
      col.setText("XXXXX");
      v.getColumns().add(col);
      TableColumn<String> col1 = new TableColumn<String>();
      col1.setText("AAAA");
      col.getColumns().add(col1);
      TableColumn<String> col2 = new TableColumn<String>();
      col2.setText("BBBB");
      col.getColumns().add(col2);

        Attachments

          Activity

            People

            Assignee:
            jgiles Jonathan Giles
            Reporter:
            gmatthewsjfx Graham Matthews (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: