Thanks for your answer. A little research revealed a simple solution for my 
problem I want to share:
As stated in https://geonet.esri.com/thread/70716 using a JApplet between the 
Frame and the SwingComponent fixes the problems. 
Following code works like a charm for me (independent of the initial size I 
use):

public class TestSWT
{
    public static void main(final String[] args)
    {
        final Display display = new Display();

        final Shell shell = new Shell(display);
        shell.setSize(800, 200);
        shell.setLayout(new FillLayout());

        createContents(shell);

        shell.open();
        while (!shell.isDisposed()) {
            if (!display.readAndDispatch()) {
                display.sleep();
            }
        }
        display.dispose();
    }

    private static void createContents(final Composite cmpParent)
    {
        final Composite cmpEmbedded = new Composite(cmpParent, SWT.EMBEDDED);
        final Frame frame = SWT_AWT.new_Frame(cmpEmbedded);

        final JApplet applet = new JApplet();
        final XMLPanel2 xmlPanel = new XMLPanel2();

        frame.setLayout(new GridLayout());

        frame.add(applet);
        applet.add(xmlPanel);
    }
}

Best regards,
Marko
_____________________________________________________
Marko Herchet
Softwareentwicklung
[email protected]

Stegmann Systems GmbH, Raiffeisenstr. 2, 63110 Rodgau, Germany
Fon: +49 (6106) 77010-0, Fax: +49 (6106) 77010-190
Handelsregister/Commercial Register Offenbach HRB 43033
Geschäftsführer/CEO: Dr. Ralf Stegmann

www.stegmannsystems.com



--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to