X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=inline;f=src%2Fnet%2Fpterodactylus%2Fjkeytool%2Fmain%2FMain.java;h=26a9496fe6f7f3661e426be34d63449dc260fbdb;hb=c068e1ba844e45f1d2b1a5e9f486491db2ced75b;hp=91b8eb5b4494a63edc74d1b80bd8d94d81d3fd9c;hpb=027dedb5560859fe63d2fff3fe1e83cf0fea7123;p=jkeytool.git diff --git a/src/net/pterodactylus/jkeytool/main/Main.java b/src/net/pterodactylus/jkeytool/main/Main.java index 91b8eb5..26a9496 100644 --- a/src/net/pterodactylus/jkeytool/main/Main.java +++ b/src/net/pterodactylus/jkeytool/main/Main.java @@ -19,7 +19,9 @@ package net.pterodactylus.jkeytool.main; -import net.pterodactylus.jkeytool.gui.MainFrame; +import net.pterodactylus.jkeytool.core.Core; +import net.pterodactylus.jkeytool.gui.Interface; +import net.pterodactylus.jkeytool.gui.swing.SwingInterface; import de.ina.util.version.Version; /** @@ -41,6 +43,10 @@ public class Main { return VERSION; } + // + // VM ENTRY + // + /** * JVM main entry method. * @@ -48,8 +54,24 @@ public class Main { * The command-line arguments */ public static void main(String[] arguments) { - MainFrame mainFrame = new MainFrame(); - mainFrame.show(); + Core core = new Core(); + Interface gui = getInterface(); + gui.setCore(core); + core.addCoreListener(gui); + gui.start(); + } + + // + // PRIVATE METHODS + // + + /** + * Returns the interface to use. + * + * @return The interface to use + */ + private static Interface getInterface() { + return new SwingInterface(); } }