Example usage for javafx.scene.layout VBox VBox

List of usage examples for javafx.scene.layout VBox VBox

Introduction

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

Prototype

public VBox() 

Source Link

Document

Creates a VBox layout with spacing = 0 and alignment at TOP_LEFT.

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    stage.initStyle(StageStyle.UNDECORATED);
    Text text = new Text("Transparent!");
    text.setFont(new Font(40));
    VBox box = new VBox();
    box.getChildren().add(text);/*from  w ww  . jav a 2 s.  com*/
    final Scene scene = new Scene(box, 300, 250);
    scene.setFill(null);
    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(final Stage stage) {
    stage.setWidth(500);/*  w w  w .j  a  v a  2s  .  c  o m*/
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    VBox root = new VBox();
    NumberAxis lineYAxis = new NumberAxis(0, 100, 10);
    CategoryAxis lineXAxis = new CategoryAxis();

    lineYAxis.setLabel("Sales");
    lineXAxis.setLabel("Products");

    root.getChildren().addAll(lineXAxis);
    scene.setRoot(root);

    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Button b1 = new Button("Close");
    b1.setEffect(new DropShadow());

    VBox root = new VBox();
    root.getChildren().addAll(b1);/*  w  ww.  j av  a2 s  .  co  m*/

    Scene scene = new Scene(root);
    stage.setScene(scene);
    stage.setTitle("Testing LayoutBounds");
    stage.show();

}

From source file:Main.java

@Override
public void start(Stage stage) {
    Button exitBtn = new Button("Exit");
    exitBtn.setOnAction(e -> Platform.exit());

    VBox root = new VBox();
    root.getChildren().add(exitBtn);/*  w  w  w .  j  av  a  2  s  .  co m*/

    Scene scene = new Scene(root, 300, 50);
    stage.setScene(scene);
    stage.setTitle("Hello JavaFX Application with a Scene");
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Button okBtn = new Button("OK");
    Button cancelBtn = new Button("Cancel");

    cancelBtn.setPrefWidth(100);//w w w.  ja va 2 s. c  o m

    VBox root = new VBox();
    root.getChildren().addAll(okBtn, cancelBtn);

    Scene scene = new Scene(root);
    stage.setScene(scene);
    stage.setTitle("Overriding Node Sizes");
    stage.show();

}

From source file:Main.java

@Override
public void start(Stage stage) {
    ChoiceBox choiceBox = new ChoiceBox();

    VBox box = new VBox();
    box.getChildren().add(choiceBox);//w w w.  j a va 2 s  .  c om
    final Scene scene = new Scene(box, 300, 250);
    scene.setFill(null);
    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    stage.initStyle(StageStyle.UNDECORATED);
    Text text = new Text("Transparent!");
    text.setFont(new Font(40));
    VBox box = new VBox();
    box.getChildren().add(text);//from   www.j a  v  a 2 s .c om
    final Scene scene = new Scene(box, 300, 250);
    scene.setFill(null);
    stage.setScene(scene);
    stage.show();
    scene.setCursor(Cursor.WAIT);
}

From source file:Main.java

License:asdf

@Override
public void start(Stage stage) {
    stage.setWidth(500);//from   w w  w  .  j a  v  a  2 s  .  c o m
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    VBox root = new VBox();

    final WebView browser = new WebView();
    final WebEngine webEngine = browser.getEngine();

    ScrollPane scrollPane = new ScrollPane();
    scrollPane.setContent(browser);
    webEngine.loadContent("<b>asdf</b>");

    root.getChildren().addAll(scrollPane);
    scene.setRoot(root);

    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(final Stage stage) {
    stage.setTitle("");
    stage.setWidth(500);/*  ww  w  .j  a  v  a2 s.  c  o m*/
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    VBox root = new VBox();

    NumberAxis yAxis = new NumberAxis(0.0, 5.0, 1.0);
    NumberAxis xAxis = new NumberAxis(0.0, 5.0, 1.0);
    ScatterChart scatterChart = new ScatterChart(xAxis, yAxis);

    root.getChildren().addAll(scatterChart);
    scene.setRoot(root);

    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(final Stage stage) {
    stage.setTitle("");
    stage.setWidth(500);/*w  w  w  . j  a  v a 2  s . co  m*/
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    VBox root = new VBox();
    NumberAxis lineYAxis = new NumberAxis(0, 100, 10);
    CategoryAxis lineXAxis = new CategoryAxis();

    lineYAxis.setLabel("Sales");
    lineXAxis.setLabel("Products");

    root.getChildren().addAll(lineXAxis);
    scene.setRoot(root);

    stage.setScene(scene);
    stage.show();
}