List of usage examples for javafx.stage Stage setHeight
public final void setHeight(double value)
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Label Sample"); stage.setWidth(400);/*from ww w. j av a 2 s . c o m*/ stage.setHeight(180); HBox hbox = new HBox(); Label label1 = new Label("Search"); label1.setRotate(270); hbox.setSpacing(10); hbox.getChildren().add((label1)); ((Group) scene.getRoot()).getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Label Sample"); stage.setWidth(400);//from w ww . j a v a 2s . c om stage.setHeight(180); HBox hbox = new HBox(); Label label1 = new Label("Search"); label1.setTextFill(Color.web("#0076a3")); hbox.setSpacing(10); hbox.getChildren().add((label1)); ((Group) scene.getRoot()).getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Label Sample"); stage.setWidth(400);//from ww w. j a va 2 s . co m stage.setHeight(180); HBox hbox = new HBox(); Label label1 = new Label("Search"); label1.setTranslateY(50); hbox.setSpacing(10); hbox.getChildren().add((label1)); ((Group) scene.getRoot()).getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Label Sample"); stage.setWidth(400);//from w ww. j a v a2 s.c o m stage.setHeight(180); HBox hbox = new HBox(); Label label1 = new Label("Search"); label1.setTextAlignment(TextAlignment.JUSTIFY); hbox.setSpacing(10); hbox.getChildren().add((label1)); ((Group) scene.getRoot()).getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Label Sample"); stage.setWidth(400);/*from ww w . ja v a2 s .c o m*/ stage.setHeight(180); HBox hbox = new HBox(); Image image = new Image(getClass().getResourceAsStream("labels.jpg")); Label label1 = new Label("Search"); label1.setGraphic(new ImageView(image)); hbox.setSpacing(10); hbox.getChildren().add((label1)); ((Group) scene.getRoot()).getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Label Sample"); stage.setWidth(400);//from w w w . j a va2s . com stage.setHeight(180); HBox hbox = new HBox(); Label label1 = new Label("Search long long long long long long long long long "); label1.setPrefWidth(100); label1.setWrapText(true); hbox.setSpacing(10); hbox.getChildren().add((label1)); ((Group) scene.getRoot()).getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Tooltip Sample"); stage.setWidth(300);// ww w.j a v a 2 s.co m stage.setHeight(150); final CheckBox cb = new CheckBox("checkBox"); final Tooltip tooltip = new Tooltip("$ tooltip"); tooltip.setFont(new Font("Arial", 16)); cb.setTooltip(tooltip); ((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.setTitle("Label Sample"); stage.setWidth(400);/*w w w. j av a 2s .c o m*/ stage.setHeight(180); HBox hbox = new HBox(); Image image = new Image(getClass().getResourceAsStream("labels.jpg")); Label label1 = new Label("Search", new ImageView(image)); hbox.setSpacing(10); hbox.getChildren().add((label1)); ((Group) scene.getRoot()).getChildren().add(hbox); label1.setLabelFor(hbox); System.out.println(label1.labelForProperty()); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Label Sample"); stage.setWidth(400);//from w ww . j a va 2 s. co m stage.setHeight(180); HBox hbox = new HBox(); Image image = new Image(getClass().getResourceAsStream("labels.jpg")); Label label1 = new Label("Search", new ImageView(image)); hbox.setSpacing(10); hbox.getChildren().add((label1)); ((Group) scene.getRoot()).getChildren().add(hbox); label1.setLabelFor(hbox); System.out.println(label1.getLabelFor()); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Label Sample"); stage.setWidth(400);/*from w w w .ja v a2 s . c om*/ stage.setHeight(180); HBox hbox = new HBox(); Image image = new Image(getClass().getResourceAsStream("labels.jpg")); Label label1 = new Label("Search", new ImageView(image)); hbox.setSpacing(10); hbox.getChildren().add((label1)); ((Group) scene.getRoot()).getChildren().add(hbox); label1.setLabelFor(hbox); stage.setScene(scene); stage.show(); }