diff options
Diffstat (limited to 'PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java')
-rw-r--r-- | PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java b/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java index d71a6c6..4acb2d0 100644 --- a/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java +++ b/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java @@ -53,6 +53,8 @@ import javax.sound.sampled.UnsupportedAudioFileException; import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.Mixer.Info; +import uk.ac.open.punchingbag.examples.SimpleKeyboard; + import PicHelper.ImagePanel; public class PunchingBagGUI implements MouseListener, MouseMotionListener, @@ -82,7 +84,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener, new File(soundDir + "E5.wav"), new File(soundDir + "F5.wav"), new File(soundDir + "G5.wav") }; - String imageDirectory = System.getProperty("user.home"); + String imageDirectory = System.getProperty("user.home") + System.getProperty("file.separator") + "My Documents" + System.getProperty("file.separator") + "images"; static PunchingBag bag = PunchingBag.getBag(); @@ -92,6 +94,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener, public static void main(String[] args) throws InterruptedException { new PunchingBagGUI(); + new SimpleKeyboard(); } PunchingBagGUI() throws InterruptedException { @@ -225,7 +228,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener, if (debugImages) System.out.println("Moving to the next image "); try { - Thread.sleep(1000); + Thread.sleep(5000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -717,7 +720,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener, System.out.println("Button Pressed: " + x + " " + y); // bag.circleExpand(x, y, 16); // bag.setLED(x, y, Color.red); - bag.noise(new Rectangle(0, 0, 9, 20), 5000); + //bag.noise(new Rectangle(0, 0, 9, 20), 5000); /* * for (int bx=0; bx<bag.ledWidth; bx++) { for (int by=0; * by<bag.ledHeight; by++) { bag.setLED(bx, by, PunchingBag.Colour.Red); |