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.setWidth(300);// w ww. 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); System.out.println(toolTip.textAlignmentProperty()); 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(""); 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(); NumberAxis lineYAxis = new NumberAxis(0, 100, 10); CategoryAxis lineXAxis = new CategoryAxis(); BarChart barChart = new BarChart(lineXAxis, lineYAxis); lineYAxis.setLabel("Sales"); lineXAxis.setLabel("Products"); root.getChildren().addAll(barChart); 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 ava 2 s. c o m stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip(); toolTip.setText("Tooltip for Button"); 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 a2 s . c o m 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")); toolBar.setOrientation(Orientation.HORIZONTAL); System.out.println(toolBar.orientationProperty()); ((Group) scene.getRoot()).getChildren().add(toolBar); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setWidth(400);/*from ww w . ja v a 2 s. c o m*/ stage.setHeight(180); HBox hbox = new HBox(); Label label1 = new Label("Search"); label1.setFont(new Font("Arial", 30)); 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.setWidth(300);/* w w w. j av a 2 s .c o m*/ stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip(); toolTip.setContentDisplay(ContentDisplay.BOTTOM); 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 . java2 s .c om stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip("Tooltip for Button"); toolTip.setWrapText(true); System.out.println(toolTip.wrapTextProperty()); 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 a 2 s .c o m 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")); toolBar.setOrientation(Orientation.HORIZONTAL); System.out.println(toolBar.getOrientation()); ((Group) scene.getRoot()).getChildren().add(toolBar); stage.setScene(scene); stage.show(); }
From source file:Main.java
License:asdf
@Override public void start(Stage stage) { stage.setTitle("HTML"); stage.setWidth(500);/* w w w. j a va2s . c om*/ 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.setStyle("-fx-background-color: white"); 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(Stage stage) { Scene scene = new Scene(new Group()); stage.setWidth(300);/*from w w w . j a v a 2 s . c om*/ stage.setHeight(150); final CheckBox cb = new CheckBox(); cb.setText("checkBox"); 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(); }