I written a Java SWT (GUI) program to just display the shell window and I running it in Eclipse and I am using Fedora 17 operating system.
I am getting the output with maximize and minimize option missing in that window. But I tried it in Windows 7 and it gives me the correct output without missing anything.
Please anyone tell me that why is it missing in Fedora 17 and what is the solution to correct it?
This is the code:
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
public class Example {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display,SWT.MAX|SWT.MIN);
Label label1 = new Label(shell,SWT.NONE);
label1.setText("CLEAR IT OUT PLEASE");
label1.setBounds(50,30,200,30);
shell.pack ();
shell.setSize(315,200);
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
}