I need someone to help fix the following code and re-write into IF-THEN logic?
public class Mystery4 extends Applet{
int clickCount=0;
public boolean mouseDown(Event evt,int x,int y) {
clickCount++;
repaint();
return true;
}
public void paint(graphics g) {
g.drawString("Click 10 times!",80,30);
g.drawString("Clicks: "+clickCount, 120,50);
switch(clickCount) {
case 0: g.drawString("You haven't clicked yet!",70,100); break;
case 1: g.drawString("You clicked once!",90,100); break;
case 2: g.drawString("You clicked 2 times!",80.100); break;
case 10: g.drawString("You click 10 times!",90,100); break;
default: g.dawString("You click more than 3 times,",50,80);
g.drawString("but not 10 times!",90,100);
}
}
}