From a47a6f18848d6d9f1318c23cb4ca33ac1b8cb5d6 Mon Sep 17 00:00:00 2001 From: mohammadreza Date: Thu, 21 May 2026 04:17:03 -0700 Subject: [PATCH] implement Main.java --- src/main/java/workshop/Main.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/workshop/Main.java b/src/main/java/workshop/Main.java index d6cd3fd..8f1a769 100644 --- a/src/main/java/workshop/Main.java +++ b/src/main/java/workshop/Main.java @@ -1,13 +1,23 @@ package workshop; import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Scene; import javafx.stage.Stage; +import java.util.Objects; + public class Main extends Application { @Override public void start(Stage stage) throws Exception { - // TODO: Load the FXML file using FXMLLoader.load() and get the Parent root - // TODO: Create a Scene with the root (width=750, height=450) and add the stylesheet "style.css" - // TODO: Set the stage title to "Pricing Plans", set the scene, and call stage.show() + + FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("pricing.fxml")); + + Scene scene = new Scene(fxmlLoader.load(), 750, 450); + scene.getStylesheets().add(Objects.requireNonNull(getClass().getResource("style.css")).toExternalForm()); + + stage.setTitle("Pricing Plans"); + stage.setScene(scene); + stage.show(); } }