SWT
维基百科,自由的百科全书
| 開發者 | Eclipse基金會 |
|---|---|
| 穩定版本 | 3.7.2/ 2012年2月24日 |
| 作業系統 | 跨平台 |
| 語言 | 多語言 |
| 開發狀態 | 進行中 |
| 類型 | Java平臺部件工具箱 |
| 許可協議 | Eclipse公共授權 |
| 網站 | www.eclipse.org/swt/ |
SWT(Standard Widget Toolkit),最初由IBM开发的一套用于Java的图形用户界面系统,用来与Swing竞争。
开源整合開發環境Eclipse就是用Java和SWT开发的。
目录 |
設計 [编辑]
編程 [编辑]
在GTK+環境下使用SWT的簡單GUI應用程式
下列為基本使用SWT的Hello World程式。顯示出一個視窗(Shell)及一個標籤。
import org.eclipse.swt.*; import org.eclipse.swt.widgets.*; public class HelloWorld { public static void main (String[] args) { Display display = new Display(); Shell shell = new Shell(display); Label label = new Label(shell, SWT.NONE); label.setText("Hello World"); label.pack(); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }
參見 [编辑]
参考资料 [编辑]
- Northover, Steve; Wilson, Mike. SWT: The Standard Widget Toolkit, Volume 1. Addison-Wesley. July 8, 2004. 592. ISBN 0-321-25663-8.
- Warner, Rob; Harris, Robert L. The definitive guide to SWT and JFace. Apress. June 21, 2004. 684. ISBN 1-59059-325-1.
- Clayberg, Eric; Rubel, Dan. Eclipse: Building commercial-quality plug-in 2nd. Addison-Wesley Professional. April 1, 2006. 864. ISBN 0-321-42672-X.
- Gamma, Erich; Beck, Kent. Contributing to Eclipse. Addison-Wesley. October 30, 2003. 416. ISBN 0-321-20575-8.
- D'Anjou, Jim; Fairbrother, Scott; Kehn, Dan; McCarthy, Pat; Kellerman, John. The Java Developers Guide to Eclipse 2nd. Addison-Wesley. November 5, 2004. 1136. ISBN 0-321-30502-7.
- Matthew Scarpino, Stephen Holder, Stanford Ng and Laurent Mihalkovic. SWT/JFace in Action. Manning. November 28, 2004. 496. ISBN 1-932394-27-3.
外部連結 [编辑]
- SWT main page
- SWT newsgroup(這個新聞群組被密碼所保護;密碼申請由這)
- Eclipse applications
- Eclipse applications, part 2
- Further information on SWT
- Information on Eclipse,including SWT information within a "platform plug-in developer guide"
- SWT Javadoc API documented at eclipse.org