I have a class which is inherited from the Slider class. I instantiated this class twice, and the two objects are close to each other on the UI (not overlapping). I need to call repaint() on mouse exit. So I overrode the
mouseExit function and simply called
repaint() inside it. I also added some DEBUG lines in the mouseExit and paint methods to see what happens.
The problem is, sometimes when I move mouse from one component to the other one the paint() method of the first component is not called. Assume the sliders are called SLIDER1 and SLIDER2 and I move the mouse from SLIDER1 to SLIDER2. This is how the DEBUG messages look like:
MOUSE EXIT SLIDER1 PAINT SLIDER2 ``` I expect it to look like this:
MOUSE EXIT SLIDER1
As I said it happens from time to time. Sometime it just works fine and sometimes it ignores the first paint method.