public static void main(String[] args) throws Exception{
Display display=new Display();
Shell shell=new Shell(display,SWT.SHELL_TRIM);
RowLayout layout=new RowLayout(SWT.VERTICAL);
shell.setLayout(layout);
shell.setText("下拉框和按钮");
Button checkbox=new Button(shell,SWT.CHECK);
checkbox.setText("SWT.CHECK");
Combo radio=new Combo(shell,SWT.ABORT);
radio.add("SWT 12");
radio.add("S");
radio.add("123");
shell.pack();
shell.open();
while(!shell.isDisposed()){
if(!display.readAndDispatch()){
display.sleep();
}
}
display.dispose();
}
swt按钮和下拉框组件
最新推荐文章于 2022-03-09 21:03:25 发布