resources_for_peek-a-boo
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
resources_for_peek-a-boo [2022/05/09 12:53] – created frchris | resources_for_peek-a-boo [2022/05/09 12:59] – frchris | ||
---|---|---|---|
Line 15: | Line 15: | ||
public class PeekABoo extends JPanel implements KeyListener, | public class PeekABoo extends JPanel implements KeyListener, | ||
{ | { | ||
- | public static int WIDTH=800; | + | public static int WIDTH=1200; |
public static int HEIGHT=600; | public static int HEIGHT=600; | ||
private Font titleFont, bigFont; | private Font titleFont, bigFont; | ||
Line 82: | Line 82: | ||
int r = (int)(26*Math.random()); | int r = (int)(26*Math.random()); | ||
ch = " | ch = " | ||
- | message = "try Again. | + | message = "No, try Again. |
+ | timer1.restart(); | ||
} | } | ||
repaint(); | repaint(); | ||
Line 94: | Line 95: | ||
if (e.getSource()==timer1){ | if (e.getSource()==timer1){ | ||
message = "Now type that Letter"; | message = "Now type that Letter"; | ||
+ | timer1.stop(); | ||
timer2.start(); | timer2.start(); | ||
} else { | } else { | ||
+ | timer2.stop(); | ||
int r = (int)(26*Math.random()); | int r = (int)(26*Math.random()); | ||
ch = " | ch = " | ||
message = "try Again. | message = "try Again. | ||
+ | timer1.restart();; | ||
} | } | ||
repaint(); | repaint(); |
resources_for_peek-a-boo.txt · Last modified: 2022/05/23 16:43 by frchris