Community
Participate
Working Groups
I have a small snippet that in windows show a Decorations widget inside a simple shell. When I use the same in linux it sow an empty box. I suppose it is a bug because the functionality requested are very common and the code is so little that the problem should be somewere else. I am using SUSE Linux 9.3 and I had a previous problem caused by the gtk-qt-engine package which affected the behaviour of colors in SWT so we have removed that package. For the rest is a standard installation of SUSE from the box. Here there is the simple snippet. package core; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.widgets.Decorations; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class Application { /** * @param args */ public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setText("Test"); shell.setSize(300, 300); Decorations decorations = new Decorations(shell,SWT.CLOSE|SWT.RESIZE); decorations.setLocation(20,20); decorations.setSize(200,200); decorations.setBackground(new Color(shell.getDisplay(),100,200,100)); decorations.setVisible(true); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } } if somebody has a similar problem or know how to fix it would be very appreciated. Thanks Alberto
From the javadoc for Decorations: "IMPORTANT: This class was intended to be abstract and should <em>never</em> be referenced or instantiated. Instead, the class <code>Shell</code> should be used." The MDI style which you are using on Windows is not supported on any other platform.
*** This bug has been marked as a duplicate of 29891 ***
sorry for the duplication, I close it.