Name: jk109818 Date: 07/15/2002
FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
FULL OPERATING SYSTEM VERSION :
This is generic, not OS-specific
ADDITIONAL OPERATING SYSTEMS :
FYI, I'm using Windows XP and Windows 2000
A DESCRIPTION OF THE PROBLEM :
PopupFactory needs an interface to help creating customized
popupfactories. Another option would be an
AbstractPopupFactory, or simply making the PopupFactory
methods more public.
Setting a new, customized shared instance is difficult, due
to the fact that only PopupFactory objects are accepted.
There are not many public methods in PopupFactory to allow
For example, forcing heavy-weight popups to be used VM-wide
(or, should I say, AppContext-wide) takes some hacking. It
is possible, but not easy, nor pretty, at least with my
Heavy-weight popups (with individual window handles) are a
necessity for mixed applications with lightweight,
heavyweight and completely native UI-components.
This bug can be reproduced always.
CUSTOMER WORKAROUND :
For forcing the use of heavy-weight popups, I used this
hack: Create a new PopupFactory and assign it as the shared
getPopup(Component owner, Component contents, int x, int y)
Call super.getPopup with the owner as a (0,0) sized JWindow
at the same location where the real owner is. Result should
be a heavy-weight popup.
Then you can get the window handle with the help of the not-
so-well-documented sun.awt.windows.WToolkit, and do
whatever tricks you need to do at the native side.
(Review ID: 159385)