import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class LayoutExample {
Display d;
Shell s;
LayoutExample() {
d = new Display();
s = new Shell(d);
s.setSize(500, 500);
s.setText("A Shell Menu Example");
s.setLayout(new FillLayout());
s.open();
while (!s.isDisposed()) {
if (!d.readAndDispatch())
d.sleep();
}
d.dispose();
}
public static void main(String[] argv) {
new LayoutExample();
}
}
|