2009年8月11日

tEST2

 

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
public class FirstSWT {
    
public static void main(String[] args) {
        Display display 
= new Display();
           Shell shell 
= new Shell(display);
           Label label 
= new Label(shell, SWT.CENTER);
           label.setText(
"Hello, World");
           label.setBounds(shell.getClientArea());
           shell.open();
           shell.setText(
"Hello World!");
           
while (!shell.isDisposed())
           
{
            
if (!display.readAndDispatch())
            
{
             display.sleep();
            }

           }

           display.dispose();
           
    }

}

posted @ 2009-08-11 00:16 爪哇岛骑士 阅读(100) | 评论 (0)编辑 收藏

2009年7月2日

Test

1     public static void main( String[] args )
2     {
3         int j = 12;
4         forint i = 1; i <= 4; i++ )
5         {
6             System.out.println( i + j );
7         }
8 
9     }System.out.println("Hello World");

1 if (i=1)
2{
3system.out.println("1");
4}

5else
6{
7system.out.println("2");
8}

posted @ 2009-07-02 13:32 爪哇岛骑士 阅读(91) | 评论 (0)编辑 收藏

仅列出标题  
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

导航

统计

常用链接

留言簿

随笔档案

搜索

最新评论

阅读排行榜

评论排行榜