From 7f2b98a554fa562801950ae665aa365f59b8b8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Ple=C3=9F?= Date: Tue, 15 May 2012 22:58:20 +0200 Subject: [PATCH] working --- src/de/ctdo/crashtest/Statemachine.java | 1 + src/de/ctdo/crashtest/SteuerungFrame.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/de/ctdo/crashtest/Statemachine.java b/src/de/ctdo/crashtest/Statemachine.java index d48fab6..14cf633 100644 --- a/src/de/ctdo/crashtest/Statemachine.java +++ b/src/de/ctdo/crashtest/Statemachine.java @@ -44,6 +44,7 @@ public class Statemachine { public void reset() { stateChangeCounter = 0; currentState = state.IDLE; + onStateChanged(); } public void handleInput(char input) { diff --git a/src/de/ctdo/crashtest/SteuerungFrame.java b/src/de/ctdo/crashtest/SteuerungFrame.java index 999ffba..5f642c7 100644 --- a/src/de/ctdo/crashtest/SteuerungFrame.java +++ b/src/de/ctdo/crashtest/SteuerungFrame.java @@ -32,6 +32,8 @@ public class SteuerungFrame extends JFrame implements StateChangeListener { setDefaultCloseOperation(EXIT_ON_CLOSE); setVisible(true); + machine.reset(); + try { mpd = new MPD("dampfradio.raum.chaostreff-dortmund.de", 6600); player = mpd.getMPDPlayer(); @@ -44,7 +46,6 @@ public class SteuerungFrame extends JFrame implements StateChangeListener { return; } - addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) {