I will resate the problem described earlier.
We have an applet which is displayed in 2 browser instances (parent/child) windows. The 2 windows have different instances of the same applet.
Problem : When the user right clicks on the applet container, a popup menu is displayed. Keeping the popup menu display intact, when the user moves to the child window and right clicks on the applet container to display the popup menu, slight flickering happens which is to dispose the popup menu displayed in the first applet and then displays in the second applet.
In the mouseReleased() method in the applet we are creating a new instance of JPopupMenu adding the necessary menu items and then displaying it. We have made sure that the 2 browser windows are having 2 different instances of the applet.
Does this mean that the JVM always creates one instance of the popup menu ?? OR how to avoid this flickering problem ??
Further to the problem mentioned above :
1. The user right clicks on the first applet to display the popup menu.
2. Clicks on a menu item (Currently no event is fired when the menu is selected). The popup menu will be disposed after this operation.
3. The user then moves to the second applet and right clicks on the second applet to display the popup menu.
4. Now when the user presses the mouse button on the menu item, there is a focus shift from the second applet to the first applet. And when the mouse is released the focus comes back to the second applet.
Note : There is no actionlistener is added to the menu items.
Any one has any idea why this kind of behaviour is occurring in the applet and popup menu ??