Guest User

Main

a guest
Sep 2nd, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 KB | None | 0 0
  1. package HomePlanner;
  2.  
  3. import javafx.application.Application;
  4. import javafx.fxml.FXML;
  5. import javafx.fxml.FXMLLoader;
  6. import javafx.scene.Parent;
  7. import javafx.scene.Scene;
  8. import javafx.scene.layout.AnchorPane;
  9. import javafx.stage.Stage;
  10.  
  11. public class Main extends Application {
  12.     Parent root;
  13.     @Override
  14.     public void start(Stage primaryStage) throws Exception{
  15.         FXMLLoader loader = new FXMLLoader(getClass().getResource("ExpensesOverview.fxml"));
  16.         Parent root = loader.load();
  17.  
  18.         Controller myController = loader.getController();
  19.  
  20.         myController.initialize();
  21.         Scene scene = new Scene(root);
  22.         primaryStage.setScene(scene);
  23.         primaryStage.show();
  24.         primaryStage.sizeToScene();
  25.     }
  26.  
  27.  
  28.     public static void main(String[] args) {
  29.         launch(args);
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment