|
mouseDown method
I can't seem to figure out a way to determine if a mouseDown condition has taken place.
I am attempting something along these lines:
if (mouseDown() == true) {
do something
}
I believe mouseDown should return true, at least that's how I have the mouseDown code written, but I can't seem to determine a way to capture the mouseDown event.
Here's the mouseDown code that gives me my x,y coordinates:
public boolean mouseDown(Event e, int x, int y) {
points.addElement(new Point(x, y));
repaint();
return true;
}
In my paint class I need to check if a mouseDown event occured.
Hope that all makes sense.
|