Hi!
I'm using the SWT_AWT bridge to add SWT-Controls to Swing.
When using the bridge in this direction the Swing Window has to be
visible, when adding SWT-Controls, otherwise you get a 'peer not
created'-Exception.
So i have to call setVisible(), although i don't know the size of the
SWT-Controls.
Here is my idea:
- create a new Shell with the Controls i want to add to the Swing Window
- compute the Shells size
- setSize() on the Swing Window
- setVisible() on the Swing Window
- create a new Shell on the Swing Window (SWT_AWT.new_Shell())
- set this Shell as the parent of my SWT Controls
- dispose first Shell
The first Shell is never opened!
I'm using Windows XP and it works fine. So my question is:
Do i have to expect problems on other systems (especially other Windows
systems)? Are there other problems aside from that it's not possible to
change the parent on all systems?