2 * GravitySimulatorApp.java
5 package edu
.mit
.ezyang
.gravity
;
7 import org
.jdesktop
.application
.Application
;
8 import org
.jdesktop
.application
.SingleFrameApplication
;
11 * The main class of the application.
13 public class GravitySimulatorApp
extends SingleFrameApplication
{
16 * At startup create and show the main frame of the application.
18 @Override protected void startup() {
19 show(new GravitySimulatorView(this));
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
) {
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);
39 * Main method launching the application.
41 public static void main(String
[] args
) {
42 launch(GravitySimulatorApp
.class, args
);