Package javafx.scene.layout

Examples of javafx.scene.layout.GridPane


   * @return the background display {@linkplain Region}
   */
  public static final GridPane createBackgroundDisplay(final Insets padding, final double gapBetweenChildren,
      final int numItemsPerRow, final boolean gaugeStyle, final int startCol, final int startRow,
      final Node... nodes) {
    final GridPane grid = new GridPane();
    if (padding != null) {
      grid.setPadding(padding);
    }
    grid.setHgap(gapBetweenChildren);
    grid.setVgap(gapBetweenChildren);
    int col = (startCol >= 0 ? startCol : 0)-1, row = startRow >= 0 ? startRow : 0;
    for (final Node node : nodes) {
      if (gaugeStyle) {
        node.getStyleClass().add("gauge");
      }
      grid.add(node, ++col, row);
      row = col == (numItemsPerRow - 1) ? row + 1 : row;
      col = col == (numItemsPerRow - 1) ? -1 : col;
    }
//    grid.setAlignment(Pos.CENTER_LEFT);
    grid.getStyleClass().add("background-display");
    return grid;
  }
View Full Code Here


        final Label labelTeamRnk9 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank9")).build();
        final Label labelTeamRnk10 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank10")).build();
        final Label labelTeamRnk11 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank11")).build();
        final Label labelTeamRnk12 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank12")).build();

        final GridPane gpTeams = GridPaneBuilder.create().alignment(Pos.TOP_LEFT).hgap(5.0).vgap(5.0).columnConstraints(ccWidth20, ccWidth180).build();
        gpTeams.add(labelTeamRnk1, 0, 0);
        gpTeams.add(tfTeamRnk1, 1, 0);
        gpTeams.add(labelTeamRnk2, 0, 1);
        gpTeams.add(tfTeamRnk2, 1, 1);
        gpTeams.add(labelTeamRnk3, 0, 2);
        gpTeams.add(tfTeamRnk3, 1, 2);
        gpTeams.add(labelTeamRnk4, 0, 3);
        gpTeams.add(tfTeamRnk4, 1, 3);
        gpTeams.add(labelTeamRnk5, 0, 4);
        gpTeams.add(tfTeamRnk5, 1, 4);
        gpTeams.add(labelTeamRnk6, 0, 5);
        gpTeams.add(tfTeamRnk6, 1, 5);
        gpTeams.add(labelTeamRnk7, 0, 6);
        gpTeams.add(tfTeamRnk7, 1, 6);
        gpTeams.add(labelTeamRnk8, 0, 7);
        gpTeams.add(tfTeamRnk8, 1, 7);
        gpTeams.add(labelTeamRnk9, 0, 8);
        gpTeams.add(tfTeamRnk9, 1, 8);
        gpTeams.add(labelTeamRnk10, 0, 9);
        gpTeams.add(tfTeamRnk10, 1, 9);
        gpTeams.add(labelTeamRnk11, 0, 10);
        gpTeams.add(tfTeamRnk11, 1, 10);
        gpTeams.add(labelTeamRnk12, 0, 11);
        gpTeams.add(tfTeamRnk12, 1, 11);

        final ColumnConstraints ccWidth80 = ColumnConstraintsBuilder.create().prefWidth(80.0).build();
        final ColumnConstraints ccWidth120 = ColumnConstraintsBuilder.create().prefWidth(120.0).build();

        final Label labelMatchday = LabelBuilder.create().text(ResourceLoader.getResource("label.firstMatchday")).build();
        final TextField tfMatchday = TextFieldBuilder.create().id("idTfMatchday").build();

        final GridPane gpMatchday = GridPaneBuilder.create().alignment(Pos.TOP_LEFT).hgap(5.0).vgap(5.0).columnConstraints(ccWidth80, ccWidth120).build();
        gpMatchday.add(labelMatchday, 0, 0);
        gpMatchday.add(tfMatchday, 1, 0);

        final VBox vBoxCenter = VBoxBuilder.create().children(gpTeams, gpMatchday, hBoxButtonArea).spacing(5.0).padding(new Insets(10, 10, 10, 10)).build();

        parent.setTop(vBoxTop);
        parent.setCenter(vBoxCenter);
View Full Code Here

        approveOption = false;
    }
   
    public void start() {
        final Stage primaryStage = this;
        GridPane grid = new GridPane();
       
        grid.setAlignment(Pos.CENTER);
        grid.setHgap(2);
        grid.setVgap(10);
        grid.setPadding(new Insets(10, 25, 10, 25));
       
        ToggleGroup group = new ToggleGroup();
        goToNumber = new RadioButton("Go To Number:");
        goToNumber.setSelected(true);
        goToNumber.setToggleGroup(group);
        goToTime = new RadioButton("Go To Time:");
        goToTime.setToggleGroup(group);
       
        keyField = new TextField();
        hField = new TextField("00");
        mField = new TextField("00");
        sField = new TextField("00");
        msField = new TextField("000");
       
        Label separator1 = new Label(":");
        Label separator2 = new Label(":");
        Label msSeparator = new Label(",");
       
        Button cancelButton = new Button("Cancel");
        cancelButton.setOnAction(new EventHandler<ActionEvent>() {

            @Override
            public void handle(ActionEvent t) {
                primaryStage.close();
            }
        });
       
        Button okButton = new Button("OK");
        okButton.setOnAction(new EventHandler<ActionEvent>() {

            @Override
            public void handle(ActionEvent t) {
                okButtonListener();
                approveOption = true;
                setCaptionKey();
                primaryStage.close();
            }
        });
       
        HBox hbBtn = new HBox(10);
        hbBtn.setAlignment(Pos.BOTTOM_RIGHT);
        hbBtn.getChildren().add(cancelButton);
        hbBtn.getChildren().add(okButton);
       
        grid.add(goToNumber, 1, 1, 7, 1);
        grid.add(goToTime, 1, 3, 7, 1);
        grid.add(keyField, 2, 2, 7, 1);
        grid.add(hField, 2, 4);
        grid.add(separator1, 3, 4);
        grid.add(mField, 4, 4);
        grid.add(separator2, 5, 4);
        grid.add(sField, 6, 4);
        grid.add(msSeparator, 7, 4);
        grid.add(msField, 8, 4);
        grid.add(hbBtn, 1, 6, 8, 1);
       
        Scene scene = new Scene(grid, 300, 250);
       
        scene.getStylesheets().add("org/livesub/styles/GlobalStyle.css");
       
View Full Code Here

        languageCombo.setMaxWidth(Double.MAX_VALUE);
       
        GridPane.setHgrow(movieNameField, Priority.ALWAYS);
        GridPane.setHgrow(languageCombo, Priority.ALWAYS);
        GridPane topPane = new GridPane();
        topPane.setHgap(5);
        topPane.setVgap(10);
        topPane.setPadding(new Insets(10, 25, 15, 25));
        topPane.add(movieNameLabel, 1, 1);
        topPane.add(languageLabel, 1, 2);
        topPane.add(movieNameField, 2, 1, 2, 1);
        topPane.add(languageCombo, 2, 2);
        topPane.add(searchButton, 3, 2);
       
        HBox.setHgrow(topPane, Priority.ALWAYS);
        HBox topBox = new HBox();
        topBox.getChildren().add(topPane);
       
View Full Code Here

       
        WebColorField webField = new WebColorField();
        webField.valueProperty().bindBidirectional(color);
        GridPane.setConstraints(webField, 1, 2, 2, 1);
       
        GridPane controls = new GridPane();
        controls.setVgap(5);
        controls.setHgap(5);
        controls.getChildren().addAll(brightnessLabel, brightnessSlider, brightnessField, saturationLabel, saturationSlider, saturationField, webLabel, webField);
        controls.setManaged(false);
        controls.resizeRelocate(
                PICKER_PADDING + 10,
                PICKER_PADDING + ARROW_SIZE + 10 + 170 + 10,
                PICKER_WIDTH - 20,
                controls.getPrefHeight());
       
        getChildren().addAll(windowClickRect, p, colorRect, colorRectOverlayOne, colorRectOverlayTwo, colorBar, colorRectIndicator, colorBarIndicator, controls);
    }
View Full Code Here

      lHBox.getChildren().add(lImageView);
    }

    // construct a area of appointment groups
    lMenuVBox.getChildren().add(new Text("Group:"));
    GridPane lAppointmentGroupGridPane = new GridPane();
    lMenuVBox.getChildren().add(lAppointmentGroupGridPane);
    lAppointmentGroupGridPane.getStyleClass().add("AppointmentGroups");
    lAppointmentGroupGridPane.setHgap(2);
    lAppointmentGroupGridPane.setVgap(2);
    int lCnt = 0;
    for (Agenda.AppointmentGroup lAppointmentGroup : getSkinnable().appointmentGroups())
    {
      // create the appointment group
      final Pane lPane = new Pane();
      lPane.setPrefSize(15, 15);
      lPane.getStyleClass().addAll("AppointmentGroup", lAppointmentGroup.getStyleClass());
      lAppointmentGroupGridPane.add(lPane, lCnt % 10, lCnt / 10 );
      lCnt++;

      // tooltip
      if (lAppointmentGroup.getDescription() != null) {
        Tooltip.install(lPane, new Tooltip(lAppointmentGroup.getDescription()));
View Full Code Here

        showPopup(evt);
      }
    });

    // construct a gridpane: one row, two columns
    gridPane = new GridPane();
    gridPane.setHgap(3);
    gridPane.add(textField, 0, 0);
    gridPane.add(imageView, 1, 0);
    ColumnConstraints column0 = new ColumnConstraints(100, 10, Double.MAX_VALUE);
    column0.setHgrow(Priority.ALWAYS);
View Full Code Here

      }
      showPopup(evt);
    });
   
    // construct a gridpane: one row, two columns
    gridPane = new GridPane();
    gridPane.setHgap(3);
    gridPane.add(textField, 0, 0);
    gridPane.add(imageView, 1, 0);
    ColumnConstraints column0 = new ColumnConstraints(100, 10, Double.MAX_VALUE);
    column0.setHgrow(Priority.ALWAYS);
View Full Code Here

  public void start(Stage stage) {
   
    HBox lHBox = new HBox();
   
    {
      GridPane lGridPane = new GridPane();
      lGridPane.setVgap(5.0);
      lGridPane.setPadding(new Insets(5.0));
      int lRowIdx = 0;
     
      {
        lGridPane.add(new Label("Empty list"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>();
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Cyclic list"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c")
          .withCyclic(true)
          ;
        lGridPane.add(lSpinner, 1, lRowIdx);
       
        final TextField lValueTextField = new TextField();
        lValueTextField.textProperty().bind(lSpinner.valueProperty());
        lGridPane.add(lValueTextField, 2, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Cyclic list with null"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>( "a", "b", "c", null )
          .withCyclic(true)
          ;
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Editable cyclic list"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>( "a", "b", "c", "d", "e" )
          .withCyclic(true)
          .withEditable(true)
          .withStringConverter(StringConverterFactory.forString())
          ;
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Editable and adding cyclic list"), 0, lRowIdx);
        final ObservableList<String> lObservableList = FXCollections.observableArrayList("a", "b", "c", "d", "e");
        ListSpinner<String> lSpinner = new ListSpinner<String>( lObservableList )
          .withCyclic(true)
          .withEditable(true)
          .withStringConverter(StringConverterFactory.forString())
          .withAddCallback(new Callback<String, Integer>()
          {         
            @Override
            public Integer call(String text)
            {
              lObservableList.add(text);
              return lObservableList.size() - 1; // notify spinner the value is appended at the end
            }
          })
          ;
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Observable list, 'z' prepended"), 0, lRowIdx);
        final ObservableList<String> lObservableList = FXCollections.observableArrayList("a", "b", "c", "d", "e");
        ListSpinner<String> lSpinner = new ListSpinner<String>( lObservableList );
        lObservableList.add(0, "z");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Observable list, first removed"), 0, lRowIdx);
        final ObservableList<String> lObservableList = FXCollections.observableArrayList("a", "b", "c", "d", "e");
        ListSpinner<String> lSpinner = new ListSpinner<String>( lObservableList );
        lObservableList.remove("a");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
//      {
//        lGridPane.add(new Label("Observable list, emptied"), 0, lRowIdx);
//        final ObservableList<String> lObservableList = FXCollections.observableArrayList("a", "b", "c", "d", "e");
//        ListSpinner<String> lSpinner = new ListSpinner<String>( lObservableList );
//        lObservableList.clear(); // TODO: causes exception
//        lGridPane.add(lSpinner, 1, lRowIdx++);
//      }
      {
        lGridPane.add(new Label("BigInteger range"), 0, lRowIdx);
        ListSpinner<BigInteger> lSpinner = new ListSpinner<BigInteger>(new ListSpinnerBigIntegerList(BigInteger.valueOf(Long.MIN_VALUE), BigInteger.valueOf(Long.MIN_VALUE + 1000)));
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Integer range"), 0, lRowIdx);
        ListSpinner<Integer> lSpinner = new ListSpinner<Integer>(new ListSpinnerIntegerList());
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Integer range 10..110"), 0, lRowIdx);
        ListSpinner<Integer> lSpinner = new ListSpinner<Integer>(10, 110);
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Integer range 10..110 with setIndex 50"), 0, lRowIdx);
        ListSpinner<Integer> lSpinner = new ListSpinner<Integer>(10, 110);
        lSpinner.setIndex(50);
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Integer range 0..1000 step 10"), 0, lRowIdx);
        ListSpinner<Integer> lSpinner = new ListSpinner<Integer>(0, 100, 10);
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Integer range -10..10"), 0, lRowIdx);
        ListSpinner<Integer> lSpinner = new ListSpinner<Integer>(-10, 10);
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Integer range 10..-10"), 0, lRowIdx);
        ListSpinner<Integer> lSpinner = new ListSpinner<Integer>(10, -10);
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("align right"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>( "a", "b", "c", "d", "e" );
        lSpinner.setStyle("-fxx-value-alignment:CENTER_RIGHT;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("align right"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>( "a", "b", "c", "d", "e" )
          .withEditable(true)
          .withStringConverter(StringConverterFactory.forString())
          ;
        lSpinner.setStyle("-fxx-value-alignment:CENTER_RIGHT;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Integer range 0..100 with %"), 0, lRowIdx);
        ListSpinner<Integer> lSpinner = new ListSpinner<Integer>(0, 100)
            .withPostfix("%")
            ;
        lSpinner.setStyle("-fxx-value-alignment:CENTER_RIGHT;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Integer range 0..100 with %"), 0, lRowIdx);
        ListSpinner<Integer> lSpinner = new ListSpinner<Integer>(0, 100)
            .withPostfix("%")
            .withEditable(true)
            .withStringConverter(StringConverterFactory.forInteger())
            ;
        lSpinner.setStyle("-fxx-value-alignment:CENTER_RIGHT;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Integer currency 0..100"), 0, lRowIdx);
        ListSpinner<Integer> lSpinner = new ListSpinner<Integer>(0, 100)
            .withPrefix("$ ")
            ;
        lSpinner.setStyle("-fxx-value-alignment:CENTER_RIGHT;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Integer currency 0..100"), 0, lRowIdx);
        final ListSpinner<Integer> lSpinner = new ListSpinner<Integer>(0, 100)
            .withPrefix("$ ")
            .withEditable(true)
            .withStringConverter(StringConverterFactory.forInteger())
            ;
        lSpinner.setStyle("-fxx-value-alignment:CENTER_RIGHT;");
       
        Button lButton = new Button("change CSS");
        lButton.onMouseClickedProperty().set(new EventHandler<MouseEvent>()
        {
          @Override
          public void handle(MouseEvent arg0)
          {
            //lSpinner.setStyle("-fxx-arrow-position:SPLIT;");
            //lSpinner.setStyle("-fxx-arrow-direction:VERTICAL;;");
            lSpinner.setStyle("-fxx-value-alignment:CENTER_LEFT; -fxx-arrow-direction:VERTICAL; -fxx-arrow-position:SPLIT;");
          }
        });
        lGridPane.add(lButton, 2, lRowIdx);
       
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
     
      lHBox.getChildren().add(lGridPane);
    }
   
    {
      GridPane lGridPane = new GridPane();
      lGridPane.setVgap(5.0);
      lGridPane.setPadding(new Insets(5.0));
      int lRowIdx = 0;

      // arrow position
      {
        lGridPane.add(new Label("DEFAULT"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("HORIZONTAL LEADING"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c");
        lSpinner.setStyle("-fxx-arrow-direction:HORIZONTAL; -fxx-arrow-position:LEADING;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("HORIZONTAL TRAILING"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c");
        lSpinner.setStyle("-fxx-arrow-direction:HORIZONTAL; -fxx-arrow-position:TRAILING;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("HORIZONTAL SPLIT"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c");
        lSpinner.setStyle("-fxx-arrow-direction:HORIZONTAL; -fxx-arrow-position:SPLIT;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("VERTICAL LEADING"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c");
        lSpinner.setStyle("-fxx-arrow-direction:VERTICAL; -fxx-arrow-position:LEADING;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("VERTICAL TRAILING"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c");
        lSpinner.setStyle("-fxx-arrow-direction:VERTICAL; -fxx-arrow-position:TRAILING;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("VERTICAL SPLIT"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c");
        lSpinner.setStyle("-fxx-arrow-direction:VERTICAL; -fxx-arrow-position:SPLIT;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("CSS"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c");
        lGridPane.add(lSpinner, 1, lRowIdx++);
        lSpinner.setId("TheSpinner");
      }
      {
        lGridPane.add(new Label("HORIZONTAL LEADING"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c").withEditable(true);
        lSpinner.setStyle("-fxx-arrow-direction:HORIZONTAL; -fxx-arrow-position:LEADING;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("HORIZONTAL TRAILING"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c").withEditable(true);
        lSpinner.setStyle("-fxx-arrow-direction:HORIZONTAL; -fxx-arrow-position:TRAILING;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("HORIZONTAL SPLIT"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c").withEditable(true);
        lSpinner.setStyle("-fxx-arrow-direction:HORIZONTAL; -fxx-arrow-position:SPLIT;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("VERTICAL LEADING"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c").withEditable(true);
        lSpinner.setStyle("-fxx-arrow-direction:VERTICAL; -fxx-arrow-position:LEADING;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("VERTICAL TRAILING"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c").withEditable(true);
        lSpinner.setStyle("-fxx-arrow-direction:VERTICAL; -fxx-arrow-position:TRAILING;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("VERTICAL SPLIT"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c").withEditable(true);
        lSpinner.setStyle("-fxx-arrow-direction:VERTICAL; -fxx-arrow-position:SPLIT;");
        lGridPane.add(lSpinner, 1, lRowIdx++);
      }
      {
        lGridPane.add(new Label("CSS SPLIT"), 0, lRowIdx);
        final ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c").withEditable(true);
       
        lGridPane.add(lSpinner, 1, lRowIdx++);
        lSpinner.setId("TheEditableSpinner");
      }
     
      lHBox.getChildren().add(lGridPane);
    }
View Full Code Here

                             .autoNightMode(true)
                             .build();
    }

    @Override public void start(Stage stage) {
        GridPane pane = new GridPane();
        pane.setPadding(new Insets(10, 10, 10, 10));
        pane.setHgap(10);
        pane.setVgap(10);
        pane.add(clock1, 0, 0);
        pane.add(clock2, 0, 1);
        pane.add(clock3, 1, 0);
        pane.add(clock4, 1, 1);
        pane.add(clock5, 2, 0);
        pane.add(clock6, 2, 1);

        //Scene scene = new Scene(pane, 400, 400, Color.rgb(195, 195, 195));
        Scene scene = new Scene(pane, Color.BLACK);

        stage.setTitle("Clock Demo");
View Full Code Here

TOP

Related Classes of javafx.scene.layout.GridPane

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.