From be0ade6ff0f0cc4f868e44434131c8d01f697fca Mon Sep 17 00:00:00 2001 From: Alan O'Callaghan Date: Sat, 1 May 2021 17:34:41 +0100 Subject: [PATCH] Dont go crazy w/new features --- pom.xml | 4 +--- src/ika/colororacle/ColorOracle.java | 27 +++++++++++---------------- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 67cc17b..b931015 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,6 @@ - @@ -37,5 +36,4 @@ 4.1 - - \ No newline at end of file + diff --git a/src/ika/colororacle/ColorOracle.java b/src/ika/colororacle/ColorOracle.java index 3dd171f..11ae4dd 100755 --- a/src/ika/colororacle/ColorOracle.java +++ b/src/ika/colororacle/ColorOracle.java @@ -142,12 +142,16 @@ public class ColorOracle extends WindowAdapter implements KeyListener, FocusList return; } - java.awt.EventQueue.invokeLater(() -> { - try { - new ColorOracle(); - } catch (Exception ex) { - Logger.getLogger(ColorOracle.class.getName()).log(Level.SEVERE, null, ex); - System.exit(-1); + java.awt.EventQueue.invokeLater(new Runnable() { + + @Override + public void run() { + try { + new ColorOracle(); + } catch (Exception ex) { + Logger.getLogger(ColorOracle.class.getName()).log(Level.SEVERE, null, ex); + System.exit(-1); + } } }); } @@ -232,21 +236,12 @@ public class ColorOracle extends WindowAdapter implements KeyListener, FocusList * Initializes the tray icon and attaches it to the system tray. */ private void initTrayIcon() throws Exception { - -// if (!SystemTray.isSupported()) { -// throw new Exception(TRAYICONS_NOT_SUPPORTED_MESSAGE); -// } - - // get the SystemTray instance -// SystemTray tray = SystemTray.getSystemTray(); SystemTray tray = SystemTray.get("Color Oracle"); ImageIcon icon = loadImageIcon(MENUICON, "Color Oracle Icon"); Image image = icon.getImage(); tray.setImage(image); tray.setTooltip(TOOLTIP); -// final Menu menu = tray.getMenu(); - // create the menu JMenu imenu = initMenu(); tray.setMenu(imenu); } @@ -635,4 +630,4 @@ public class ColorOracle extends WindowAdapter implements KeyListener, FocusList switchToNormalVision(); } } -} \ No newline at end of file +}