X-Git-Url: https://git.pterodactylus.net/?p=jkeytool.git;a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjkeytool%2Fmain%2FMain.java;h=26a9496fe6f7f3661e426be34d63449dc260fbdb;hp=22b4ec46e0516b2983924287723a35c3b44b3c7b;hb=93811f6061a8da43bd50cf04cffcc150d465f845;hpb=cb532ce01960cf8aaf236233df78d747292fdb7e diff --git a/src/net/pterodactylus/jkeytool/main/Main.java b/src/net/pterodactylus/jkeytool/main/Main.java index 22b4ec4..26a9496 100644 --- a/src/net/pterodactylus/jkeytool/main/Main.java +++ b/src/net/pterodactylus/jkeytool/main/Main.java @@ -20,7 +20,8 @@ package net.pterodactylus.jkeytool.main; import net.pterodactylus.jkeytool.core.Core; -import net.pterodactylus.jkeytool.gui.MainFrame; +import net.pterodactylus.jkeytool.gui.Interface; +import net.pterodactylus.jkeytool.gui.swing.SwingInterface; import de.ina.util.version.Version; /** @@ -42,6 +43,10 @@ public class Main { return VERSION; } + // + // VM ENTRY + // + /** * JVM main entry method. * @@ -50,9 +55,23 @@ public class Main { */ public static void main(String[] arguments) { Core core = new Core(); - MainFrame mainFrame = new MainFrame(core); - core.addCoreListener(mainFrame); - mainFrame.show(); + 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(); } }