I have written a program with two components that use mouseListeners:
- ResizeRectangle draws a rectangle with handles and allows moving and resizing of the rectangle. It handles MouseEvents and MouseMotionEvents (MouseMove, MousePressed, MouseDragged and MouseReleased).
- IconGrid draws a grid of icons within the rectangle and allows selecting (clicking) an icon. It handles the MouseClicked event for this.
It all works fine under Windows. I tried to port the program to the Mac today, but there the MouseClicked event never gets fired. I put the MouseClicked event in ResizeRectangle, but there it also wont get fired. I put the MouseReleased event in IconGrid and that does get fired. So the problem really seems to be with the mouseClicked event.
I read another article that stated that on the Mac even a small pixel change between mouse press and mouse release would result in MouseClicked not being fired. But even when I click with my mouse in the air (so no chance of moving the mouse between the press and the release), the mouseClicked event doesnt get fired.
Anyone else had this problem? Is this a bug on the Mac?