您现在的位置: 中国教师站 >> 教师关注 >> 电脑技术 >> 编程技术 >> Java >> 正文

Google
在Windows下使用GCJ+SWT的实例
作者:Siny 文章来源:中国教师站cn-teacher 点击数: 更新时间:2007-4-22 14:52:09
       gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);

       gridData.horizontalSpan = 2;

       ownerInfo.setLayoutData(gridData);

     

       new Label(ownerInfo, SWT.NONE).setText("Name:");

       ownerName = new Text(ownerInfo, SWT.SINGLE | SWT.BORDER);

       ownerName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

     

       new Label(ownerInfo, SWT.NONE).setText("Phone:");

       ownerPhone = new Text(ownerInfo, SWT.SINGLE | SWT.BORDER);

       ownerPhone.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

     

       Button enter = new Button(shell, SWT.PUSH);

       enter.setText("Enter");

       gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);

       gridData.horizontalSpan = 3;

       enter.setLayoutData(gridData);

       enter.addSelectionListener(new SelectionAdapter() {

          public void widgetSelected(SelectionEvent event) {

              System.out.println(" Dog Name: " + dogName.getText());

              System.out.println("Dog Breed: " + dogBreed.getText());

              System.out.println("Owner Name: " + ownerName.getText());

              System.out.println("Owner Phone: " + ownerPhone.getText());

              System.

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页

相关专题:
 
 网友评论:(评论内容只代表网友观点,与本站立场无关!)
GOOGLE广告

阅读排行

| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 |
中国教师站

中国教师站 版权所有 Copyright © 2006-2020 All Rights Reserved 站长:Sina & Siny
[备用域名:www.JXZYW.Com] 有事请留言有事请留言
【实力成就精品 诚信呵护品牌】

信息产业部备案
苏ICP备06018635号