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.
12 * @author Edward Z. Yang <ezyang@mit.edu>
14 public class GravitySimulatorApp
extends SingleFrameApplication
{
17 * At startup create and show the main frame of the application.
19 @Override protected void startup() {
20 show(new GravitySimulatorView(this));
24 * This method is to initialize the specified window by injecting resources.
25 * Windows shown in our application come fully initialized from the GUI
26 * builder, so this additional configuration is not needed.
28 @Override protected void configureWindow(java
.awt
.Window root
) {
32 * A convenient static getter for the application instance.
33 * @return the instance of GravitySimulatorApp
35 public static GravitySimulatorApp
getApplication() {
36 return Application
.getInstance(GravitySimulatorApp
.class);
40 * Main method launching the application.
42 public static void main(String
[] args
) {
43 launch(GravitySimulatorApp
.class, args
);