Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.IOException;
- import java.util.logging.Level;
- import java.util.logging.Logger;
- import javafx.application.Application;
- import javafx.fxml.FXMLLoader;
- import javafx.scene.Scene;
- import javafx.scene.layout.AnchorPane;
- import javafx.stage.Stage;
- public class MyHelloToTheWorld extends Application {
- @Override
- public void start(Stage primaryStage) {
- try {
- AnchorPane page = FXMLLoader.load(MyHelloToTheWorld.class
- .getResource("FirstGui.fxml"));
- // page.setCache(true);// this would make it even worse :-(
- Scene scene = new Scene(page);
- primaryStage.setScene(scene);
- primaryStage.setTitle("A First Scenebuilder Example");
- primaryStage.setWidth(600);
- primaryStage.show();
- } catch (IOException e) {
- Logger.getLogger(MyHelloToTheWorld.class.getName()).log(
- Level.SEVERE, null, e);
- }
- }
- public static void main(String[] args) {
- launch(args);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement