List of usage examples for javafx.stage Stage show
@Override public final void show()
From source file:ijfx.ui.filter.FilterTest.java
@Override public void start(Stage primaryStage) throws Exception { borderPane = new BorderPane(); borderPane.getStylesheets().add(ImageJFX.getStylesheet()); borderPane.getStyleClass().add("explorer-filter"); Button updateButton = new Button("Update values"); filter = new DefaultNumberFilter(); Scene scene = new Scene(borderPane); primaryStage.setScene(scene);/*from w w w. java 2s . co m*/ borderPane.setCenter(filter.getContent()); borderPane.setBottom(updateButton); updateButton.setOnAction(this::update); primaryStage.show(); }
From source file:aajavafx.Schedule1Controller.java
@FXML private void handleGetCustomersUnvisited(ActionEvent event) throws IOException { try {//from www .j av a2 s . co m getUnsignedCustomers(); FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("UnsignedCustomers.fxml")); Parent root1 = (Parent) fxmlLoader.load(); Stage stage = new Stage(); stage.setScene(new Scene(root1)); stage.show(); } catch (Exception e) { e.printStackTrace(); } }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); TilePane tile = new TilePane(); tile.setHgap(8);// www .j a v a2s . c om tile.setPrefColumns(4); for (int i = 0; i < 20; i++) { tile.getChildren().add(new CheckBox("CheckBox")); } HBox hbox = new HBox(10); hbox.setPadding(new Insets(20, 0, 0, 20)); hbox.getChildren().setAll(tile); System.out.println(TilePane.getAlignment(hbox)); Group root = (Group) scene.getRoot(); root.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 a va 2s .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(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); TilePane tile = new TilePane(); tile.setHgap(8);//from w w w. j a v a 2 s. c o m tile.setPrefColumns(4); for (int i = 0; i < 20; i++) { tile.getChildren().add(new CheckBox("CheckBox")); } System.out.println(tile.tileAlignmentProperty()); HBox hbox = new HBox(10); hbox.setPadding(new Insets(20, 0, 0, 20)); hbox.getChildren().setAll(tile); Group root = (Group) scene.getRoot(); root.getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group root = new Group(); Scene scene = new Scene(root, 550, 250, Color.web("0x0000FF", 1.0)); Text text = new Text(50, 100, "JavaFX 2.0 from Java2s.com"); Font sanSerif = Font.font("Dialog", 30); text.setFont(sanSerif);/*from w w w . ja v a 2 s . co m*/ text.setFill(Color.RED); root.getChildren().add(text); BoxBlur bb = new BoxBlur(); bb.setWidth(15); bb.setHeight(15); bb.setIterations(3); text.setEffect(bb); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { stage.setTitle("ComboBoxSample"); Scene scene = new Scene(new Group(), 450, 250); TextField notification = new TextField(); notification.setText("Label"); notification.clear();// ww w . j a v a 2 s . c om GridPane grid = new GridPane(); grid.setVgap(4); grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(notification, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); 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);// ww w. jav a 2 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); 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(), 450, 250); TilePane tile = new TilePane(); tile.setHgap(8);/* w w w . ja v a2 s . c o m*/ tile.setPrefColumns(4); for (int i = 0; i < 20; i++) { tile.getChildren().add(new CheckBox("CheckBox")); } HBox hbox = new HBox(10); hbox.setPadding(new Insets(20, 0, 0, 20)); hbox.getChildren().setAll(tile); TilePane.setAlignment(hbox, Pos.BASELINE_CENTER); Group root = (Group) scene.getRoot(); root.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);/*from w w w . j a v a 2 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")); toolBar.setOrientation(Orientation.HORIZONTAL); System.out.println(toolBar.getOrientation()); ((Group) scene.getRoot()).getChildren().add(toolBar); stage.setScene(scene); stage.show(); }