i tried it! it works easier!! ,saves more line than what i was about to do :) :p
Type: Posts; User: chronoz13
i tried it! it works easier!! ,saves more line than what i was about to do :) :p
another lesson learned, take some rest, before debugging :D :D :D :D
the only solution that i only know now, is to use 2 separate boolean variables to control the logic that i need to implement
oops i think we just posted almost at the same time, i just got it hehe , :D and yes, thats the problem, i wasnt paying attention on ALL the if-else statement, well im a bit tired, thats why i posted...
now i get it, theres is no wrong with the code itself, i was the one at fault,
// if-else statement for red square
if (e.getX() >= 30 && e.getX() <= 60 &&
...
i already did some print statements, i still dont get why does the boolean value doesnt change when i hover the red sqaure, when the mouseMove event has the same statements both for red and blue...
i beg your pardon with the title of my post, but im not sure what title to give on this one, ill post the code first
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import...