List of usage examples for javafx.stage Stage setWidth
public final void setWidth(double value)
From source file:Main.java
@Override public void start(final Stage stage) { stage.setWidth(500); stage.setHeight(500);/*from w w w. j a v a 2s .c o m*/ Scene scene = new Scene(new Group()); VBox root = new VBox(); CategoryAxis lineXAxis = new CategoryAxis(getData()); ObservableList<String> list = lineXAxis.getCategories(); root.getChildren().addAll(lineXAxis); scene.setRoot(root); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(final Stage stage) { stage.setWidth(500); stage.setHeight(500);//from ww w . j av a 2 s.co m Scene scene = new Scene(new Group()); VBox root = new VBox(); CategoryAxis lineXAxis = new CategoryAxis(getData()); System.out.println(lineXAxis.getCategorySpacing()); root.getChildren().addAll(lineXAxis); scene.setRoot(root); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(final Stage stage) { stage.setWidth(500); stage.setHeight(500);// w w w.j av a 2s .c o m Scene scene = new Scene(new Group()); VBox root = new VBox(); CategoryAxis lineXAxis = new CategoryAxis(getData()); lineXAxis.setEndMargin(0.9); root.getChildren().addAll(lineXAxis); scene.setRoot(root); stage.setScene(scene); stage.show(); }
From source file:Main.java
License:asdf
@Override public void start(Stage stage) { stage.setWidth(500); stage.setHeight(500);/* w w w . j a v a 2s. co m*/ 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.setFitToWidth(true); 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.setWidth(500); stage.setHeight(500);// w ww . j a v a 2s . c o m Scene scene = new Scene(new Group()); VBox root = new VBox(); CategoryAxis lineXAxis = new CategoryAxis(getData()); lineXAxis.setStartMargin(1.2); root.getChildren().addAll(lineXAxis); scene.setRoot(root); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(final Stage stage) { stage.setWidth(500); stage.setHeight(500);/*from w ww . jav a2 s. c o m*/ Scene scene = new Scene(new Group()); VBox root = new VBox(); CategoryAxis lineXAxis = new CategoryAxis(getData()); System.out.println(lineXAxis.getDisplayPosition("Sales")); root.getChildren().addAll(lineXAxis); scene.setRoot(root); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(final Stage stage) { stage.setWidth(400); stage.setHeight(500);/*from w w w . ja va 2 s . c o m*/ Scene scene = new Scene(new Group()); final WebView browser = new WebView(); final WebEngine webEngine = browser.getEngine(); ScrollPane scrollPane = new ScrollPane(); scrollPane.setContent(browser); browser.getEngine().setOnAlert((WebEvent<String> wEvent) -> { System.out.println("Alert Event - Message: " + wEvent.getData()); }); webEngine.load("http://java2s.com"); scene.setRoot(scrollPane); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { stage.setTitle("HTML"); stage.setWidth(500); stage.setHeight(500);/*from www. jav a 2 s .c o m*/ Scene scene = new Scene(new Group()); VBox root = new VBox(); Hyperlink link = new Hyperlink("www.java2s.com"); root.getChildren().addAll(link); 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); stage.setHeight(500);/* w w w . j a va2s . c o m*/ Scene scene = new Scene(new Group()); VBox vbox = new VBox(8); // spacing = 8 vbox.getChildren().addAll(new Button("Cut"), new Button("Copy"), new Button("Paste")); scene.setRoot(vbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
License:asdf
@Override public void start(Stage stage) { stage.setTitle("HTML"); stage.setWidth(500); stage.setHeight(500);//w ww. jav a2 s. co m Scene scene = new Scene(new Group()); FlowPane flow = new FlowPane(); 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(); }