C
chirs
Hi,
I have a java applet which will allow user to type in a letter. But
the user has to first click on the applet to set focus. How can I set
focus to applet in code? Here is a part of code:
int m;
public void paint(Graphics g) {
g.drawString("" + (char)m,200,200);
}
public boolean keyDown(Event evt, int key) {
m=key;
repaint();
return true;
}
Thanks
I have a java applet which will allow user to type in a letter. But
the user has to first click on the applet to set focus. How can I set
focus to applet in code? Here is a part of code:
int m;
public void paint(Graphics g) {
g.drawString("" + (char)m,200,200);
}
public boolean keyDown(Event evt, int key) {
m=key;
repaint();
return true;
}
Thanks