版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 s1 = new String(b; finally if (fis != null try fis.close(; catch (IOException e1 else if (e.getActionCommand(.equals("scan2" FileInputStream fis = null; try JFileChooser jfc = new JFileChooser(; jfc.showOpenDialog(frame; File f2 = jfc.getSelectedFile(; if (f2 = null return; jtf2.setText(f
2、2.getAbsolutePath(; byte b = new byte(int f2.length(; fis = new FileInputStream(f2; fis.read(b; s2 = new String(b; finally if (fis != null try fis.close(; catch (IOException e1 else if (e.getActionCommand(.equals("add +" if (s1 = null | s2 = null | s1.equals("" | s2.equals("
3、" return; calnum = 1; j2.setText("正在计算." t.start(; else if (e.getActionCommand(.equals("min -" if (s1 = null | s2 = null | s1.equals("" | s2.equals("" return; calnum = 2; j2.setText("正在计算." t.start(; else if (e.getActionCommand(.equals("mul
4、 *" if (s1 = null | s2 = null | s1.equals("" | s2.equals("" return; 34 calnum = 3; j2.setText("正在计算." t.start(; else if (e.getActionCommand(.equals("div /" if (s1 = null | s2 = null | s1.equals("" | s2.equals("" return; calnum = 4; j2.
5、setText("正在计算." t.start(; catch (Exception e5 e5.printStackTrace(; private void writeResult(String res throws IOException FileOutputStream fos = null; try fos = new FileOutputStream(new File("result.txt" fos.write(res.getBytes(; fos.flush(; j2.setText("计算完成!用时 "+(endtime-starttime+ " 毫秒" finally if (fos != null try fos.close(; catch (IOException e1 private void showMe( frame.setVisible(true; frame.setLocation(400, 200; frame.setSize(400, 230; frame.setResizable(false; frame.setDefaultClo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- HY/T 0273.2-2023海洋灾害风险评估和区划技术导则第2部分:海浪
- 考点05 全等三角形(解析版)
- 课改版八年级下册《Unit 12 Working at the Vet's》同步练习卷
- 2024秋四年级英语上册 Module 8 Unit 1 We're going to visit Hainan教案 外研版(三起)
- 2024秋六年级语文上册 第六单元 18 只有一个地球教案 新人教版
- 2024秋八年级语文上册 第4单元 17昆明的雨教案 新人教版
- 2024秋八年级数学上册 第十一章 三角形11.1 与三角形有关的线段 3三角形的稳定性教学设计(新版)新人教版
- 2024七年级英语下册 Unit 6 I'm watching TV教案设计(新版)人教新目标版
- 2024年五年级语文下册 第五单元 习作:形形色色的人新学习单教案 新人教版
- 2024年五年级英语上册 Unit 6 It's a grapefruit Fun Facts教案 人教精通版(三起)
- 煤矿井下常见不安全行为
- WSET二级考试题库整理(共229题)
- 欠税日常管理课件
- 华为胜任能力素质模型
- 中医药在骨科疾病中的应用
- 大学美育(第二版) 课件 第四单元:绘画艺术
- 预订用餐服务流程
- 墨多多谜境冒险
- 做个聪明的消费者
- 小班-数学-小小玩具国
- 北师大版数学三年级上册《植树》说课稿
评论
0/150
提交评论