BestJewSinceJC 700 Posting Maven

To demonstrate the second point I made above, consider what happens when you move the mouse. Lets say you move the mouse down, but you do not move it in any other direction. The mouseMoved method is called, and mouseLeft is set to true. Now, lets say you eventually make it down to mouseDown = true. Then, repaint is called where you have if (Y > 250). Now, you enter the repaint method. Since mouseLeft is true, and mouseRight is true... both of those things will be repainted.

Now, another thing will happen: since you never reset mouseLeft, mouseRight, mouseUp, and mouseDown to "false"... every time you enter the repaint method, these things might be repainted. Consider using "else if" statements inside of mouseMoved to call repaint, so that repaint is never called when you don't want it to be. Also, make sure that at the end of mouseMoved, you reset all of the mouseUp, down, left, and right variables to false. Also, do not set these variables to "true" until you have determined that they should be true. In other words, setting them to true should be done inside the if statement, not outside of it.

Also, I'm not exactly sure how your assignment works, but you should consider that any time you color something, you are never un-coloring it. So lets say you color something because of mouseDown. What happens when the thing you colored isn't in the "mouseDown" sector anymore? Shouldn't you un-color it?


       
Ezzaral commented: Helpful. +15
BestJewSinceJC 700 Posting Maven

S.o.S - My code may have been wrong, but I got this discussion going, which is good enough for me

:)

~s.o.s~ commented: Heh, nice one. :-) +25
BestJewSinceJC 700 Posting Maven

The person who posted above me is completely wrong. Assembly is faster than any other code if you use/code it correctly. It could be that the optimizations the compiler made for the C++ code were good optimizations, whereas the code you wrote was poorly designed and written.

BestJewSinceJC 700 Posting Maven

this is the file bellow .. download and explain what u understand my frind

This (your existence on this site) must be some kind of a sociology experiment. If so, I guess the goal would be to figure out how much help you can receive from people while disregarding what they say, being annoying, and ignoring all of the rules for human social interaction.


Ask a specific question: this involves identifying some specific concept you do not fully understand and explaining what you do and don't understand about it, as well as your reasons (if any) for not understanding.

dickersonka commented: couldn't have put it better myself +2
BestJewSinceJC 700 Posting Maven

Yeah, I figured as much after your (Ezzaral) and Stul made your posts. I got the GUI working already in light of what you guys told me. Thanks for the articles though, I'll def. check those out. And thanks for all the help.

jasimp commented: Wow. An actual thank you. +9