This week's giveaways are in the MongoDB and Jobs Discussion forums. We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line! See this thread and this one for details.
Help understanding why mouse event seems to be registering twice.
Joined: Sep 25, 2011
I'm working on a applet that in part will update the user with the amount of times they have clicked and it seems that the variable I set 'count' is doing: count += 2; instead of what I put down as: count ++; I need help understanding why that is.
Don't call init from your paint method. The paint method is called quite often, in some applets even multiple times per second. That means that you will do all that initialization each and every time. Instead, use the "regular" init method:
Note how I did move the changing of the color of page to the paint methods; that is the one thing from your old init method that you do want to occur during each paint.