Add mouse events to Java Applet?
Hi,
I need to add mouse events to my Java Applet. I know that Java has an event based structure, but I'm sure there must be some way of doing this. I have:
public class blobby extends Applet
{
public void paint (Graphics g)
{
// Some code in loop.
// Detect mouse click
}
}
Surely I can add something along the lines of:
|f(Applet.mouseclick == true)
{
// Do this
}
Can anyone guide me as to what that code might be?
|