Button button = new Button(shell, SWT.PUSH);
button.setText( "Push Me ");
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
PopupList list = new PopupList(shell);
list.setItems(OPTIONS);
Text t = new Text(shell, SWT.SINGLE);
t.setText( "china ");
t.setVisible(true);
}
swt动状态生成Text为什么会不成功那?
------解决方案--------------------
看JDKAPI
------解决方案--------------------
我觉得是程序上的问题,有错误
Button button = new Button(shell, SWT.PUSH);
button.setText( "Push Me ");
button.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent e) {
}
});
应该是这样的一个结构.你的那个有点不对劲,改改看吧