Facebook
From Gentle Kangaroo, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 222
  1. package sample;
  2.  
  3. import javafx.application.Application;
  4. import javafx.fxml.FXMLLoader;
  5. import javafx.scene.Parent;
  6. import javafx.scene.Scene;
  7. import javafx.stage.Stage;
  8.  
  9. public class Main extends Application {
  10.  
  11.     @Override
  12.     public void start(Stage primaryStage) throws Exception{
  13.         Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
  14.         primaryStage.setTitle("Hello World");
  15.         primaryStage.setScene(new Scene(root, 300, 275));
  16.         primaryStage.show();
  17.     }
  18.  
  19.  
  20.     public static void main(String[] args) {
  21.         launch(args);
  22.     }
  23. }
  24.