全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
(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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2023年荆门辅警协警招聘考试真题含答案详解(新)
- 2023年黑龙江辅警协警招聘考试真题及1套参考答案详解
- 2023年甘南州辅警协警招聘考试备考题库完整参考答案详解
- 2024年临夏州辅警招聘考试题库及答案详解(有一套)
- 2023年珠海辅警协警招聘考试真题含答案详解(基础题)
- 2024年南充辅警协警招聘考试备考题库及答案详解(易错题)
- 2024年城口县辅警招聘考试真题有完整答案详解
- 2024年丰都县辅警协警招聘考试备考题库附答案详解(培优a卷)
- 2023年眉山辅警协警招聘考试备考题库附答案详解
- 2023年邵阳辅警招聘考试题库及答案详解(真题汇编)
- 2025年健康管理师(二级)技能考核试卷
- 部编版小学语文三年级上册第四单元作业设计
- 2025北京市公安局顺义分局勤务辅警、流动人口管理员招聘100人考试笔试模拟试题及答案解析
- 校园消防安全培训课件
- 2025年份护理学导论试题及答案
- 2025-2026学年海南省海口市六年级语文上册期中考试试卷及答案
- 七年级语文句子排序练习题集
- 消防员宣传火灾知识培训课件
- 华为ICT大赛2025-2026中国区(网络)赛道高分备考试题库500题(含答案解析)
- 数控加工中心培训知识课件
- 25《刘姥姥进大观园》+公开课一等奖创新教案
评论
0/150
提交评论