Do you have many items in your popup? Do you have a scroll bar?
I just tried it here under linux if there is not scrollbar displayed then it
is normal that scrolling the mouse wheel closes the popup.
This also happens for Ocean and Nimbus LookAndFeel and the others too I guess.
But if you have a scrollbar and the mouse is over the popup menu then the
scoll events should be consumed by the scrollpane in the popup.
I tested it some more and found out that in the class
BasicPopupMenuUI in the eventDispatched method (line 824)
there is the following code
case MouseEvent.MOUSE_WHEEL:
if (isInPopup(src)) {
return;
}
cancelPopupMenu();
break;
}
The isInPopup(src) seems to fail but I can not debug this because I develop
under Linux and whenever I set a breakpoint that is hit when a Popup is
visible my whole KDE freezes and I have to switch to the console and kill the
Java App so I have no chance to step throu this code.
I hope this gives you a hint on why the popup closes.
Could you set a breakpoint there and step throu the isInPopup method and see
why it does not work as expected?
What is src and why does it not have a JPopup parent?
I would be very interested in your findings as I use seeglass a lot now and I
try to fix all bugs I get aware of.
Have fun,
- Rossi
Have fun,
- Rossi