mport java.awt.*;
import java.awt.event.*;
import java.applet.*;
/*
<applet code = "SimpleKey" width = 300 height =100 >
</applet>
*/
public class SimpleKey //qui mi da errore
extends Applet
implements KeyListener {
String msg = "";
int x = 10, y = 20;
public void init() {
addKeyListener(this);
requestFocus();
}
public void keyPressed (KeyEvent ke) {
showStatus ("keydown");
}
public void keyReleased (KeyEvent ke) {
showStatus("keyup");
}
public void KeyTyped(KeyEvent ke) {
msg += ke.getKeyChar();
repaint();
}
public void paitn(Graphics g) {
g.drawString(msg,x,y);
}
}
qualcuno mi sa dire perchè il compilatore mi da errore a SimpleKey??????
|