D 程式設計/DWT
外觀
< D 程式設計
DWT 是 Java 中 Eclipse/SWT(標準視窗小部件工具包)GUI 庫從 Java 到 D 的移植。
你可以編寫與 SWT 相似的程式碼。例如
import dwt.all;
void main(char[][] args)
{
Display display = new Display();
Shell shell = new Shell(display);
Label label = new Label(shell, DWT.NONE);
label.setText("Hello World");
label.pack();
shell.pack();
shell.open();
while (!shell.isDisposed())
{
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}