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

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

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");

    toolTip.setTextAlignment(TextAlignment.CENTER);

    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  a  v a  2 s  .  co m*/
    stage.setHeight(150);

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");
    Node icon = new ImageView(new Image(getClass().getResourceAsStream("root.png")));
    toolTip.setGraphic(icon);

    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 a  va  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.graphicTextGapProperty());

    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) {
    stage.setTitle("HTML");
    stage.setWidth(500);/*w ww .  ja  v a  2s  .  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();
    Hyperlink hpl = new Hyperlink("java2s.com");
    hpl.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            webEngine.load("http://java2s.com");
        }
    });

    root.getChildren().addAll(hpl, browser);
    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  ww w.j  a va2  s .  c o m
    stage.setHeight(150);

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");

    toolTip.setWrapText(true);

    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 a  va  2  s  . c o  m
    stage.setHeight(150);

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");

    toolTip.setTextOverrun(OverrunStyle.CENTER_ELLIPSIS);

    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  va 2 s.co  m
    stage.setHeight(150);

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");
    toolTip.setFont(Font.font("", 0.5));

    System.out.println(toolTip.isWrapText());

    button.setTooltip(toolTip);

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

    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 ww  .j a v  a  2  s . c o  m*/
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    VBox root = new VBox();

    Path path = new Path();
    path.getElements().add(new MoveTo(50.0f, 0.0f));
    VLineTo vlt = new VLineTo(50.0f);

    path.getElements().add(vlt);
    System.out.println(vlt.getY());

    root.getChildren().addAll(path);
    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   www.jav  a 2  s.  c om
    stage.setHeight(150);
    final CheckBox cb = new CheckBox();
    cb.setText("checkBox");
    cb.setSelected(true);

    cb.selectedProperty().addListener(new ChangeListener<Boolean>() {
        public void changed(ObservableValue<? extends Boolean> ov, Boolean old_val, Boolean new_val) {
            System.out.println(cb.isSelected());
        }
    });
    ((Group) scene.getRoot()).getChildren().add(cb);

    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);/*  www  .j  av a 2  s  . co  m*/
    stage.setHeight(150);
    final CheckBox cb = new CheckBox();
    cb.setText("checkBox");
    cb.setAllowIndeterminate(true);

    cb.indeterminateProperty().addListener(new ChangeListener<Boolean>() {
        public void changed(ObservableValue<? extends Boolean> ov, Boolean old_val, Boolean new_val) {
            System.out.println(cb.isSelected());
        }
    });
    ((Group) scene.getRoot()).getChildren().add(cb);

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