菜鸟一个 那位大哥帮帮忙?package oneswt;import java.awt.Button;
import java.awt.Composite;
import java.awt.Label;import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;public class SimpleForm {
public static void main(String [] args){
Display display =new Display();
Shell shell=new Shell(display);
shell.setText("窗口");
shell.setBounds(100, 100, 300, 250);
FormLayout layout=new FormLayout();
layout.marginHeight=100;
layout.marginWidth=100;
shell.setLayout(layout);
// Label hello=new Label();         Label hello = new Label(shell,SWT.CANCEL); 怎么老是提示没有创建方法吗,小弟那做错了呢。
hello.setText("ni hao ");
shell.pack();
shell.open();
while(!shell.isDisposed()){
if(!display.readAndDispatch())
display.sleep();
}
display.dispose();
}}