| |
17. 28. 1. 创建并初始化一个微调控件 |
|
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Spinner;
public class SpinnerCreateInit {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
Spinner spinner = new Spinner(shell, SWT.BORDER);
spinner.setMinimum(0);
spinner.setMaximum(1000);
spinner.setSelection(500);
spinner.setIncrement(1);
spinner.setPageIncrement(100);
spinner.pack();
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}
|
|
17. 28. 微调控件 | | 17. 28. 1. | 创建并初始化一个微调控件 | | | | 17. 28. 2. | 微调控件浮点值 | | |
|