Initial commit.
[gravitysimulator.git] / src / edu / mit / ezyang / gravity / GravitySimulatorApp.java
blob962cfec277837cc8a54460f35a91099c32e01d6a
1 /*
2 * GravitySimulatorApp.java
3 */
5 package edu.mit.ezyang.gravity;
7 import org.jdesktop.application.Application;
8 import org.jdesktop.application.SingleFrameApplication;
10 /**
11 * The main class of the application.
13 public class GravitySimulatorApp extends SingleFrameApplication {
15 /**
16 * At startup create and show the main frame of the application.
18 @Override protected void startup() {
19 show(new GravitySimulatorView(this));
22 /**
23 * This method is to initialize the specified window by injecting resources.
24 * Windows shown in our application come fully initialized from the GUI
25 * builder, so this additional configuration is not needed.
27 @Override protected void configureWindow(java.awt.Window root) {
30 /**
31 * A convenient static getter for the application instance.
32 * @return the instance of GravitySimulatorApp
34 public static GravitySimulatorApp getApplication() {
35 return Application.getInstance(GravitySimulatorApp.class);
38 /**
39 * Main method launching the application.
41 public static void main(String[] args) {
42 launch(GravitySimulatorApp.class, args);