See More

import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class Java_FX2 extends Application { // Handle User Events Button button; public static void main (String args[]) { launch(args); } @Override public void start(Stage primaryStage) throws Exception { primaryStage.setTitle("Wills opening screen"); button = new Button(); button.setText("Hello Will"); StackPane layout = new StackPane(); layout.getChildren().add(button); Scene scene = new Scene(layout, 300, 300); primaryStage.setScene(scene); primaryStage.show(); } }