From 343e8e0affae68d542c068093bba47c5616755ee Mon Sep 17 00:00:00 2001 From: Aadit Agrawal Date: Sat, 26 Oct 2024 02:15:26 +0530 Subject: [PATCH] Upload files to "OOP/Java/Lab/Week13" --- OOP/Java/Lab/Week13/FirstFXApp.java | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 OOP/Java/Lab/Week13/FirstFXApp.java diff --git a/OOP/Java/Lab/Week13/FirstFXApp.java b/OOP/Java/Lab/Week13/FirstFXApp.java new file mode 100644 index 0000000..46b7f1e --- /dev/null +++ b/OOP/Java/Lab/Week13/FirstFXApp.java @@ -0,0 +1,29 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.scene.layout.FlowPane; +import javafx.scene.paint.Color; +import javafx.stage.Stage; + +public class FirstFXApp extends Application { + + @Override + public void start(Stage primaryStage) { + Label welcomeLabel = new Label("Welcome to JavaFX programming"); + welcomeLabel.setTextFill(Color.MAGENTA); + + FlowPane flowPane = new FlowPane(); + flowPane.setHgap(15); + flowPane.setVgap(15); + flowPane.getChildren().add(welcomeLabel); + + Scene scene = new Scene(flowPane, 500, 200); + primaryStage.setTitle("This is the first JavaFX Application"); + primaryStage.setScene(scene); + primaryStage.show(); + } + + public static void main(String[] args) { + launch(args); + } +}