implement Main.java

This commit is contained in:
2026-05-21 04:17:03 -07:00
parent a0baa6ebf1
commit a47a6f1884
+13 -3
View File
@@ -1,13 +1,23 @@
package workshop; package workshop;
import javafx.application.Application; import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage; import javafx.stage.Stage;
import java.util.Objects;
public class Main extends Application { public class Main extends Application {
@Override @Override
public void start(Stage stage) throws Exception { 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" FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("pricing.fxml"));
// TODO: Set the stage title to "Pricing Plans", set the scene, and call stage.show()
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();
} }
} }