28 lines
957 B
Java
28 lines
957 B
Java
package workshop;
|
|
|
|
import javafx.application.Application;
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.scene.Parent;
|
|
import javafx.scene.Scene;
|
|
import javafx.stage.Stage;
|
|
|
|
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
|
|
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
|
|
|
|
// TODO: Create a Scene with the root (width=750, height=450) and add the stylesheet "style.css"
|
|
Scene scene = new Scene(root, 750, 450);
|
|
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
|
|
|
|
// TODO: Set the stage title to "Pricing Plans", set the scene, and call stage.show()
|
|
stage.setTitle("Pricing Plans");
|
|
stage.setScene(scene);
|
|
stage.show();
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
launch(args);
|
|
}
|
|
} |