Like to add an example that can be used to reproduce the problem I described in
my last mail
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);
frame.setLayout(new BorderLayout());
final JApplet applet = new JApplet();
frame.add(applet);
final XMLPanel2 xmlPanel = new XMLPanel2();
frame.add(xmlPanel);
}
}
Adding the following listener at the end of createContents seems to fix the
initial icon-problem. But after opening a file and resizing the shell a bit it
reappears.
frame.addComponentListener(new ComponentListener()
{
@Override
public void componentShown(final ComponentEvent evt)
{
//
}
@Override
public void componentResized(final ComponentEvent evt)
{
System.out.println("cmpResize");
xmlPanel.paintAll(xmlPanel.getGraphics());
}
@Override
public void componentMoved(final ComponentEvent evt)
{
//
}
@Override
public void componentHidden(final ComponentEvent evt)
{
//
}
});
_____________________________________________________
Marko Herchet
Softwareentwicklung
[email protected]<mailto:[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