Example usage for javafx.scene.layout GridPane setVgap

List of usage examples for javafx.scene.layout GridPane setVgap

Introduction

In this page you can find the example usage for javafx.scene.layout GridPane setVgap.

Prototype

public final void setVgap(double value) 

Source Link

Usage

From source file:Testing.TestMain.java

public static void grid(Stage stage) {
    GridPane grid = new GridPane();
    grid.setHgap(8);/*  w w w . java  2s  .  co m*/
    grid.setVgap(8);
    grid.setPadding(new Insets(5));

    Text mp3FileNameT, trackNoT, titleT, artistsT, lengthT, albumT, yearT, genreT, commentsT;

    mp3FileNameT = new Text("Filename:");
    trackNoT = new Text("Track Number:");
    titleT = new Text("Title:");
    artistsT = new Text("Artists:");
    lengthT = new Text("Track Length:");
    albumT = new Text("Album:");
    yearT = new Text("Year:");
    genreT = new Text("Genere:");
    commentsT = new Text("Comments/Lyrics: ");

    TextField mp3FileNameTF, trackNoTF, titleTF, artistsTF, lengthTF, albumTF, yearTF, genreTF;
    TextArea commentsTF;

    mp3FileNameTF = new TextField("");
    trackNoTF = new TextField("");
    titleTF = new TextField("");
    artistsTF = new TextField("");
    lengthTF = new TextField("");
    albumTF = new TextField("");
    yearTF = new TextField("");
    genreTF = new TextField("");
    commentsTF = new TextArea("");

    grid.addColumn(0, mp3FileNameT, trackNoT, titleT, artistsT, lengthT, albumT, yearT, genreT, commentsT);
    grid.addColumn(1, mp3FileNameTF, trackNoTF, titleTF, artistsTF, lengthTF, albumTF, yearTF, genreTF,
            commentsTF);
    grid.setAlignment(Pos.TOP_LEFT);
    Scene scene = new Scene(grid, 500, 500);

    stage.setTitle("Grid Test");
    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group(), 450, 250);

    TextField notification = new TextField();
    notification.setText("Label");

    notification.clear();//www  .  j a va 2s . c o m

    GridPane grid = new GridPane();
    grid.setVgap(4);
    grid.setHgap(10);
    grid.setPadding(new Insets(5, 5, 5, 5));
    grid.add(new Label("To: "), 0, 0);
    grid.add(notification, 1, 0);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(grid);
    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group(), 450, 250);

    ComboBox<String> emailComboBox = new ComboBox<String>();
    emailComboBox.getItems().addAll("A", "B", "C", "D", "E");
    emailComboBox.setValue("A");
    System.out.println(emailComboBox.getValue());

    GridPane grid = new GridPane();
    grid.setVgap(4);
    grid.setHgap(10);//from  w ww. j a v  a  2s. co  m
    grid.setPadding(new Insets(5, 5, 5, 5));
    grid.add(new Label("To: "), 0, 0);
    grid.add(emailComboBox, 1, 0);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(grid);
    stage.setScene(scene);
    stage.show();

}

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group(), 450, 250);
    ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4");
    ComboBox<String> emailComboBox = new ComboBox<String>();
    emailComboBox.setItems(list);//w  w w .j  a  v a  2 s.  c  o m
    emailComboBox.setValue("A");

    GridPane grid = new GridPane();
    grid.setVgap(4);
    grid.setHgap(10);
    grid.setPadding(new Insets(5, 5, 5, 5));
    grid.add(new Label("To: "), 0, 0);
    grid.add(emailComboBox, 1, 0);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(grid);
    stage.setScene(scene);
    stage.show();

}

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group(), 450, 250);
    ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4");
    ComboBox<String> emailComboBox = new ComboBox<String>(list);

    emailComboBox.setValue("A");
    System.out.println(emailComboBox.getConverter());

    GridPane grid = new GridPane();
    grid.setVgap(4);
    grid.setHgap(10);//w  w  w  .ja v a  2 s  . co m
    grid.setPadding(new Insets(5, 5, 5, 5));
    grid.add(new Label("To: "), 0, 0);
    grid.add(emailComboBox, 1, 0);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(grid);
    stage.setScene(scene);
    stage.show();

}

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group(), 450, 250);
    ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4");
    ComboBox<String> emailComboBox = new ComboBox<String>(list);

    emailComboBox.setValue("A");
    System.out.println(emailComboBox.getEditor());

    GridPane grid = new GridPane();
    grid.setVgap(4);
    grid.setHgap(10);//from  w w w . j a va 2  s . c  om
    grid.setPadding(new Insets(5, 5, 5, 5));
    grid.add(new Label("To: "), 0, 0);
    grid.add(emailComboBox, 1, 0);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(grid);
    stage.setScene(scene);
    stage.show();

}

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group(), 450, 250);
    ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4");
    ComboBox<String> emailComboBox = new ComboBox<String>(list);

    emailComboBox.setValue("A");
    System.out.println(emailComboBox.getSelectionModel().getSelectedIndex());

    GridPane grid = new GridPane();
    grid.setVgap(4);
    grid.setHgap(10);/*  w  w  w.  j a v a 2 s .c o  m*/
    grid.setPadding(new Insets(5, 5, 5, 5));
    grid.add(new Label("To: "), 0, 0);
    grid.add(emailComboBox, 1, 0);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(grid);
    stage.setScene(scene);
    stage.show();

}

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group(), 450, 250);
    ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4");
    ComboBox<String> emailComboBox = new ComboBox<String>(list);

    emailComboBox.setValue("A");
    System.out.println(emailComboBox.getButtonCell());

    GridPane grid = new GridPane();
    grid.setVgap(4);
    grid.setHgap(10);//from   ww  w . j  av a2s. c  om
    grid.setPadding(new Insets(5, 5, 5, 5));
    grid.add(new Label("To: "), 0, 0);
    grid.add(emailComboBox, 1, 0);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(grid);
    stage.setScene(scene);
    stage.show();

}

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group(), 450, 250);
    ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4");
    ComboBox<String> emailComboBox = new ComboBox<String>(list);

    emailComboBox.setValue("A");
    System.out.println(emailComboBox.editorProperty());

    GridPane grid = new GridPane();
    grid.setVgap(4);
    grid.setHgap(10);//from w w  w  . j  a  va2 s. c  o m
    grid.setPadding(new Insets(5, 5, 5, 5));
    grid.add(new Label("To: "), 0, 0);
    grid.add(emailComboBox, 1, 0);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(grid);
    stage.setScene(scene);
    stage.show();

}

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group(), 450, 250);
    ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4");
    ComboBox<String> emailComboBox = new ComboBox<String>(list);

    emailComboBox.setValue("A");
    System.out.println(emailComboBox.cellFactoryProperty());

    GridPane grid = new GridPane();
    grid.setVgap(4);
    grid.setHgap(10);//from  www  .j av  a  2  s  . c  om
    grid.setPadding(new Insets(5, 5, 5, 5));
    grid.add(new Label("To: "), 0, 0);
    grid.add(emailComboBox, 1, 0);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(grid);
    stage.setScene(scene);
    stage.show();

}