start core
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 4 Apr 2008 22:09:34 +0000 (22:09 +0000)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 4 Apr 2008 22:09:34 +0000 (22:09 +0000)
git-svn-id: http://trooper/svn/projects/jSite/trunk@594 c3eda9e8-030b-0410-8277-bc7414b0a119

src/net/pterodactylus/jsite/main/Main.java

index 383aa0c..c465311 100644 (file)
@@ -19,6 +19,9 @@
 
 package net.pterodactylus.jsite.main;
 
+import net.pterodactylus.jsite.core.Core;
+import net.pterodactylus.jsite.gui.SwingInterface;
+
 /**
  * Main class that is called by the VM.
  * 
@@ -34,6 +37,20 @@ public class Main {
         *            The command-line arguments
         */
        public static void main(String[] args) {
+               new Main().start();
+       }
+
+       /**
+        * Starts the core and the default {@link SwingInterface}.
+        */
+       private void start() {
+               Core core = new Core();
+
+               SwingInterface swingInterface = new SwingInterface(core);
+               core.addCoreListener(swingInterface);
+               swingInterface.start();
+
+               core.start();
        }
 
 }