- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
JAVA编写的基础计算器源代码
实验题目 计算器 设计过程 代码 计算器frame类 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package counter; import java.awt.*; import javax.swing.*; /** * * @author Administrator */ public class CounterFrameClass extends JFrame{ public CounterFrameClass() { this.setTitle(Counter); Container contentPane=getContentPane(); CounterPanelClass panel=new CounterPanelClass(); contentPane.add(panel); this.setSize(300,300); this.setVisible(true); this.setResizable(false); } } 计算器panel类 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package counter; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * * @author Administrator */ public class CounterPanelClass extends JPanel{ private JLabel display; private JPanel panel; private double result; private String lastCommand; private boolean start; public CounterPanelClass() { setLayout(new BorderLayout()); this.result = 0; this.lastCommand = =; this.start = true; this.display = new JLabel(0,SwingConstants.RIGHT); this.display.setForeground(Color.red); this.display.setBorder(BorderFactory.createCompoundBorder( BorderFactory.createLineBorder(Color.yellow), BorderFactory.createEmptyBorder(5, 5, 5, 5))); add(display,BorderLayout.NORTH); ActionListener insert=new InsertAction(); ActionListener command=new CommandAction(); panel=new JPanel(); panel.setLayout(new GridLayout(4,4)); addButton(7,insert); addButton(8,insert); addButton(9,insert); addButton(/,command); addButton(4,insert); addButton(5,insert); addButton(6,insert); addButton(*,command); addButton(1,insert); addButton(2,insert); addButton(3,insert);
您可能关注的文档
- DF8B机车增压器故障分析与处理.doc
- DELL EQLPS6000ESXi4 LUN热扩展.doc
- DIV+CSS定位详解.doc
- DIY技术考察培训资料.doc
- DM单发放.doc
- Doc1侵权责任法论文.doc
- Domino升级建议IBM官方文件.doc
- DNS体系结构.ppt
- DOS批处理实例教程.doc
- DELL双路服务器安装全过程详细图解.doc
- 新能源汽车高压线束热管理创新与2025年技术挑战报告.docx
- 2025年智能护理床在养老院应用现状研究报告.docx
- 《2025年卫星通信终端户外作业应急通信刚需场景风险评估报告》.docx
- 2026河北美泰公司校招20人备考题库及答案详解1套.docx
- 2025年农产品上行物流品牌化建设与推广方案.docx
- 新能源汽车高压线束技术升级与2025年新能源汽车市场报告.docx
- 新能源行业数字化转型之路:2025年技术创新与产业应用.docx
- 新能源汽车动力电池热失控灭火技术在新能源建筑中的应用研究报告.docx
- 2025年AI学习系统在特殊教育应用情况报告.docx
- 新能源行业产品生命周期评估:光热发电系统热效率与环境评价报告.docx
有哪些信誉好的足球投注网站
文档评论(0)