start core
[jSite2.git] / 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();
        }
 
 }