SHARE
TWEET

MyHelloToTheWorld.java

a guest Oct 15th, 2013 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.io.IOException;
  2. import java.util.logging.Level;
  3. import java.util.logging.Logger;
  4.  
  5. import javafx.application.Application;
  6. import javafx.fxml.FXMLLoader;
  7. import javafx.scene.Scene;
  8. import javafx.scene.layout.AnchorPane;
  9. import javafx.stage.Stage;
  10.  
  11. public class MyHelloToTheWorld extends Application {
  12.  
  13.         @Override
  14.         public void start(Stage primaryStage) {
  15.                 try {
  16.                         AnchorPane page = FXMLLoader.load(MyHelloToTheWorld.class
  17.                                         .getResource("FirstGui.fxml"));
  18.                         // page.setCache(true);// this would make it even worse :-(
  19.                         Scene scene = new Scene(page);
  20.                         primaryStage.setScene(scene);
  21.                         primaryStage.setTitle("A First Scenebuilder Example");
  22.                         primaryStage.setWidth(600);
  23.                         primaryStage.show();
  24.                 } catch (IOException e) {
  25.                         Logger.getLogger(MyHelloToTheWorld.class.getName()).log(
  26.                                         Level.SEVERE, null, e);
  27.                 }
  28.         }
  29.  
  30.         public static void main(String[] args) {
  31.                 launch(args);
  32.         }
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top