Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.34 KB | None | 0 0
  1. public class MCServerGUIApp extends SingleFrameApplication {
  2.  
  3.     /**
  4.      * At startup create and show the main frame of the application.
  5.      */
  6.     @Override protected void startup() {
  7.         GUI = new MCServerGUIView(this, Server);
  8.         show(GUI);
  9.     }
  10.  
  11.     /**
  12.      * This method is to initialize the specified window by injecting resources.
  13.      * Windows shown in our application come fully initialized from the GUI
  14.      * builder, so this additional configuration is not needed.
  15.      */
  16.     @Override protected void configureWindow(java.awt.Window root) {
  17.     }
  18.  
  19.     /**
  20.      * A convenient static getter for the application instance.
  21.      * @return the instance of MCServerGUIApp
  22.      */
  23.     public static MCServerGUIApp getApplication() {
  24.         return Application.getInstance(MCServerGUIApp.class);
  25.     }
  26.  
  27.     /**
  28.      * Main method launching the application.
  29.      */
  30.     public static void main(String[] args) {
  31.         new MCServerGUIApp().run(args);  
  32.     }
  33.  
  34.     private void run(String[] args) {
  35.         Server = new MCServerGUIServerModel();
  36.         MainWorker = new MCServerGUIMainWorker();
  37.         launch(MCServerGUIApp.class, args);
  38.         GUI.Server.addObserver(GUI);
  39.     }
  40.  
  41.     private MCServerGUIView GUI;
  42.     private MCServerGUIServerModel Server;
  43.     private MCServerGUIMainWorker MainWorker;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement