From f5562e6160082ea771d5cf4cfe28e7e2f4077a33 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 27 Jan 2009 00:24:08 +0100 Subject: [PATCH] Use new interface. --- src/net/pterodactylus/jkeytool/main/Main.java | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/net/pterodactylus/jkeytool/main/Main.java b/src/net/pterodactylus/jkeytool/main/Main.java index 22b4ec4..9f4b477 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,22 @@ 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(); + core.addCoreListener(gui); + gui.start(); + } + + // + // PRIVATE METHODS + // + + /** + * Returns the interface to use. + * + * @return The interface to use + */ + private static Interface getInterface() { + return new SwingInterface(); } } -- 2.7.4