




全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
(1)package ch4;import org.eclipse.swt.layout.GridLayout;import org.eclipse.swt.graphics.Point;import org.eclipse.swt.widgets.MessageBox;import org.eclipse.swt.widgets.Shell;import org.eclipse.swt.widgets.Display;import org.eclipse.swt.layout.FillLayout;import org.eclipse.swt.widgets.Button;import org.eclipse.swt.SWT;import org.eclipse.swt.graphics.Rectangle;public class P63 private Shell sShell = null;private Button button = null;/* * param args */public static void main(String args) / TODO 自动生成方法存根/* Before this is run, be sure to set up the launch configuration (Arguments-VM Arguments) * for the correct SWT library path in order to run with the SWT dlls. * The dlls are located in the SWT plugin jar. * For example, on Windows the Eclipse SWT 3.1 plugin jar is: * installation_directorypluginsorg.eclipse.swt.win32_3.1.0.jar */Display display = Display.getDefault();P63 thisClass = new P63();thisClass.createSShell();thisClass.sShell.open();while (!thisClass.sShell.isDisposed() if (!display.readAndDispatch()display.sleep();display.dispose();/* * This method initializes sShell */private void createSShell() sShell = new Shell();sShell.setText(Shell);sShell.setSize(new Point(300, 200);sShell.setLayout(null);button = new Button(sShell, SWT.NONE);button.setBounds(new Rectangle(78, 54, 65, 33);button.setText(确定);button.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) MessageBox box=new MessageBox(sShell,SWT.ICON_INFORMATION|SWT.Close); box.setText(Java课堂!); int a =new int100; for(int n=0;na.length;n+) an=n+1; String s=; int k=0; for(int n=0;nVM Arguments) * for the correct SWT library path in order to run with the SWT dlls. * The dlls are located in the SWT plugin jar. * For example, on Windows the Eclipse SWT 3.1 plugin jar is: * installation_directorypluginsorg.eclipse.swt.win32_3.1.0.jar */Display display = Display.getDefault();P64 thisClass = new P64();thisClass.createSShell();thisClass.sShell.open();while (!thisClass.sShell.isDisposed() if (!display.readAndDispatch()display.sleep();display.dispose();/* * This method initializes sShell */private void createSShell() sShell = new Shell();sShell.setText(Shell);sShell.setSize(new Point(300, 200);sShell.setLayout(null);label = new Label(sShell, SWT.NONE);label.setBounds(new Rectangle(9, 3, 211, 44);label.setText(原数据:);label1 = new Label(sShell, SWT.NONE);label1.setBounds(new Rectangle(8, 53, 212, 48);label1.setText(排序后:);button = new Button(sShell, SWT.NONE);button.setBounds(new Rectangle(23, 114, 75, 42);button.setText(重置);button.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) for(int i=0;inum.length;i+) numi=(int)(Math.random()*90)+10; for(int j=0;ji;j+) if(numi=numj) i=i-1;break; String ss=原数据: ; for(int i=0;i0;i-) max=0; for(int j=1;j=i;j+) if(nummaxnumj) max=j; temp=numm
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年木材加工及制品合作协议书
- 网络资源共享与服务协议
- 农村集体经济组织与农户合作种植协议
- 养猪场买卖合同协议书
- 体育场馆建设与管理合同
- 公文处理案例与解析试题及答案
- 收银员半年工作总结
- 渔区水产合作经营与利润分成协议
- 农田管理与农业科技合作协议
- 跨区域数据传输保密协议
- 川教版二年级《生命.生态.安全》下册第10课《面对学习困难》课件
- 端午节趣味谜语及答案
- 机械制造工艺学 王先逵课后答案
- 天府国际生物城C7-1实验室项目环境影响报告
- 招商计划书内容
- 2023年高考英语模拟卷(天津专用)(解析版)
- 地铁车站毕业设计
- 小学数学前置性探究学习的实践研究
- 轨道交通信号基础知到章节答案智慧树2023年同济大学
- 如何预防与处理劳动争议培训课件
- JJG 1148-2022电动汽车交流充电桩(试行)
评论
0/150
提交评论