Is it possible to make an applet listen for input events automatically? I have to click on the applet window/awt frame (multiple times) to make it have focus and register input events.
The way im currently doing this is by adding the listners in the applet (and awt frame if i need to pop it up in a frame):
addKeyListener(this);
addMouseListener(this);
addMouseMotionListener(this);
and define their implementation:
protected void processMouseEvent(MouseEvent evt)
{
<>
super.processMouseEvent(evt);
}
protected void processMouseMotionEvent(MouseEvent evt)
{
<>
super.processMouseMotionEvent(evt);
}
protected void processKeyEvent(KeyEvent e)
{
<>
super.processKeyEvent(e);
}
And another one, is it possible to have an awt frame receive mouse events outside of its frame?
Thanks!
