Example usage for javafx.stage Stage setHeight

List of usage examples for javafx.stage Stage setHeight

Introduction

In this page you can find the example usage for javafx.stage Stage setHeight.

Prototype

public final void setHeight(double value) 

Source Link

Usage

From source file:Main.java

License:asdf

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

    FlowPane flow = new FlowPane(Orientation.VERTICAL);
    flow.setVgap(8);
    flow.setHgap(4);
    flow.setPrefWrapLength(300); // preferred width = 300
    for (int i = 0; i < 10; i++) {
        flow.getChildren().add(new Button("asdf"));
    }
    scene.setRoot(flow);

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

From source file:Main.java

@Override
public void start(final Stage stage) {
    stage.setTitle("");
    stage.setWidth(500);/*www . j  a  v a2  s .co  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("HTML");
    stage.setWidth(500);//from   w w  w. j ava2 s  .c o m
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    VBox vbox = new VBox();
    ListView list = new ListView();
    VBox.setVgrow(list, Priority.ALWAYS);
    vbox.getChildren().addAll(new Label("Names:"), list);

    scene.setRoot(vbox);

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

From source file:Main.java

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

    Hyperlink hpl = new Hyperlink("java2s.com");

    hpl.setFont(Font.font("Arial", 14));

    root.getChildren().addAll(hpl);

    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);/*from   w  w  w.j  av a2s  .c om*/
    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) {
    Scene scene = new Scene(new Group());
    stage.setWidth(300);/* w  ww .ja  v a2  s  . com*/
    stage.setHeight(150);

    ToolBar toolBar = new ToolBar(new Button("New"), new Button("Open"), new Button("Save"), new Separator(),
            new Button("Clean"), new Button("Compile"), new Button("Run"), new Separator(), new Button("Debug"),
            new Button("Profile"));
    System.out.println(toolBar.getItems());
    ((Group) scene.getRoot()).getChildren().add(toolBar);

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

From source file:Main.java

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

    final ImageView selectedImage = new ImageView();
    Image image1 = new Image(Main.class.getResourceAsStream("a.jpg"));
    selectedImage.setImage(image1);

    selectedImage.setRotate(90);

    root.getChildren().addAll(selectedImage);

    scene.setRoot(root);

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

From source file:Main.java

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

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");
    System.out.println(toolTip.getGraphicTextGap());
    button.setTooltip(toolTip);

    ((Group) scene.getRoot()).getChildren().add(button);

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

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group());
    stage.setWidth(300);/*from   w  w  w.j a v a2s. c om*/
    stage.setHeight(150);

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");
    System.out.println(toolTip.getContentDisplay());
    button.setTooltip(toolTip);

    ((Group) scene.getRoot()).getChildren().add(button);

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

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group());
    stage.setWidth(300);/*from   ww w. j ava2s .  c  om*/
    stage.setHeight(150);

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");
    System.out.println(toolTip.graphicProperty());
    button.setTooltip(toolTip);

    ((Group) scene.getRoot()).getChildren().add(button);

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