I'd have a boolean that was set (true) when the mouse is first pressed (like you have) and then reset (false) when the mouse button is released. Your code has half of that problem solved :) (probably...
Type: Posts; User: helloworld922
I'd have a boolean that was set (true) when the mouse is first pressed (like you have) and then reset (false) when the mouse button is released. Your code has half of that problem solved :) (probably...
You're going to run into problems by calling your class paint because there's a method called paint, but it's not a constructor. Remember, Java is case sensitive. As a general convention, name...
I would test re-loading first in your mouseClicked event handler. This will give you what you want, and also keeps me from having to figure out the correct logic for testing the conditions :)