The HelloWorld SWT
来源:互联网 发布:分享淘宝零食店铺论文 编辑:程序博客网 时间:2024/06/06 16:59
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.layout.*;
public class Test
...{
public static void main(String[] args)
...{
Display display = new Display();
/**//*
* Create a Shell with the default style i.e. full screen, no decoration
* on PocketPC. Alternative: 'new Shell(display, SWT.CLOSE)' to get the
* Pocket PC 'Ok' button.
*/
Shell shell = new Shell(display);
/**//*
* Set a text so that the top level Shell also appears in the Pocket PC
* task list
*/
shell.setText("HelloWorld");
/**//*
* Set a menubar to follow UI guidelines on Pocket PC
*/
Menu mb = new Menu(shell, SWT.BAR);
shell.setMenuBar(mb);
/**//*
* Add widgets
*/
FillLayout layout = new FillLayout();
layout.type = SWT.VERTICAL;
shell.setLayout(layout);
Label label = new Label(shell, SWT.CENTER);
label.setText("Hello World");
shell.open();
while (!shell.isDisposed())
...{
if (!display.readAndDispatch())
display.sleep();
}
}
}
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.layout.*;
public class Test
...{
public static void main(String[] args)
...{
Display display = new Display();
/**//*
* Create a Shell with the default style i.e. full screen, no decoration
* on PocketPC. Alternative: 'new Shell(display, SWT.CLOSE)' to get the
* Pocket PC 'Ok' button.
*/
Shell shell = new Shell(display);
/**//*
* Set a text so that the top level Shell also appears in the Pocket PC
* task list
*/
shell.setText("HelloWorld");
/**//*
* Set a menubar to follow UI guidelines on Pocket PC
*/
Menu mb = new Menu(shell, SWT.BAR);
shell.setMenuBar(mb);
/**//*
* Add widgets
*/
FillLayout layout = new FillLayout();
layout.type = SWT.VERTICAL;
shell.setLayout(layout);
Label label = new Label(shell, SWT.CENTER);
label.setText("Hello World");
shell.open();
while (!shell.isDisposed())
...{
if (!display.readAndDispatch())
display.sleep();
}
}
}
- The HelloWorld SWT
- SWT 入门之 -> HelloWorld
- Swt编程中的HelloWorld
- SWT之一: HelloWorld
- Getting Started with the SWT
- The SWT FAQ 中文(1)
- The SWT FAQ 中文(2)
- The SWT FAQ 中文(3)
- The SWT FAQ 中文(4)
- The SWT FAQ 中文(5)
- The SWT FAQ 中文(6)
- The SWT FAQ 中文(7)
- The SWT FAQ 中文(8)
- The SWT FAQ 中文(9)
- The SWT FAQ 中文(10)
- The SWT FAQ 中文(11)
- The SWT FAQ 中文(12)
- SWT: The Standard Widget Toolkit
- 中式网站之古典风格
- C语言面试题大汇总
- .NET三层经典架构PetShop3.0分析连载[一]
- ISMA与h.264 over TS之争(转)
- 三层交换机与路由器的比较
- The HelloWorld SWT
- asp.net日期控件
- 文本比较程序
- WEB SKILL HOT KEY
- 轻松学DIV教程(div+css布局)
- uClinux系统分析
- 七款嵌入式Linux操作系统简介
- oracle 9i for linux安装文档
- DIV+CSS三行两列经典布局