on 07-28-2006 1:15 PM
Hi,
Im trying to put in the centre of the screen a popup window using the following code:
IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.
getComponentInfo().findInWindows("Test");
IWDWindow window =wdComponentAPI. getWindowManager().
createWindow (windowInfo, true);
Dimension auxDimension = java.awt.Toolkit.
getDefaultToolkit(). getScreenSize();
int initialH = new Double(auxDimension.getWidth()).intValue();
int initialW = new Double (auxDimension.getHeight()).intValue();
window.setWindowPosition((initialH-200)/2,(initialW-50)/2);
but the code line
Dimension auxDimension = java.awt.Toolkit.
getDefaultToolkit(). getScreenSize();
throws an java.awt.HeadlessException exception
Then, How can I put in the centre of the screen a popup window?
Thanks,
Ricard.
Hi,
Use the following code:
window.setWindowPosition(WDWindowPos.CENTER);
Kind Regards,
S.Saravanan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.