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

GridPane layout of ListViews broken in Lombard

    Details

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

      MacOSX 10.7.5; JavaFX 2.2.0 under JDK 1.7.0_13 (works correctly); JavaFX 8.0.0-ea-b80 under JDK 8-ea-b80.

      Description

      In JavaFX 8.0.0, placing a collection of ListViews in a GridPane will not lay them out so they are all visible. In the following code, the ListViews are too large and only one of the four rows is visible. In versions 2.2.x, the lists were resized so that all rows were visible.

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.ListView;
      import javafx.scene.layout.GridPane;
      import javafx.stage.Stage;

      public class ListLayoutTest extends Application {

      @Override
      public void start(Stage primaryStage) {
      GridPane root = new GridPane();
          for (int i=0; i<4; i++) {
            root.addRow(i, lview(), lview());
          }
          
          Scene scene = new Scene(root, 600, 400);
          primaryStage.setScene(scene);
          primaryStage.show();
      }

      private ListView<String> lview() {
      ListView<String> lview = new ListView<String>();
      lview.getItems().addAll("Apples", "Oranges", "Pears");
      return lview ;
      }

      public static void main(String[] args) {
      launch(args);
      }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jgiles Jonathan Giles
                Reporter:
                jdenvirjfx James Denvir (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:
                  Imported: