Personally, i avoid mouseClicked. I either just use mousePressed, or mouseReleased.
Yes, your popup cannot paint while the mouseClicked is running. When a mouse clicks, the Java JRE calls your mouseClicked method in the Event Thread. Only one method can be running per Thread. Events are only processed with the Event Thread. So if you stop that Thread. You pause all AWT/Swing events period. If you block that Thread, you application likely gets recognized by windows as "unresonsive" as it cannot respond to events.
So in conclusion, do not do long processing in the AWT Event Thread.
Main Topics
Browse All Topics





by: objectsPosted on 2009-05-20 at 17:33:31ID: 24437383
JPopupMenu popup = new JPopupMenu(); ntPopupMen u(popup);
// add actions to your popup here
sortingProgress.setCompone