网站大量收购独家精品文档,联系QQ:2885784924

java计算器代码(国外英文资料).doc

  1. 1、本文档共28页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
java计算器代码(国外英文资料)

java计算器代码(国外英文资料) 进口java.awt。*; 进口java.awt.event。*; 类leiyi扩展框架{ 静态双con1 = 0; 静态int jihao = 0; 静态int肖= 0; 静态int jishu = 10; 私人按钮button1 = new按钮(“7”); 私人按钮button2 = new按钮(8); 私人按钮button3 = new按钮(“9”); 私人按钮button4 = new按钮(“+”); 私人按钮button5 = new按钮(4); 私人按钮button6 = new按钮(“5”); 私人按钮button7 = new按钮(“6”); 私人按钮button8 = new按钮(“-”); 私人按钮button9 = new按钮( 1 ); 私人按钮button10 = new按钮(“2”); 私人按钮button11 = new按钮(“3”); 私人按钮button12 = new按钮( = ); 私人按钮button13 = new按钮(“*”); 私人按钮button14 = new按钮(“/”); 私人按钮button15 = new按钮(“0”); 私人按钮button16 = new按钮(“CE”); 私人按钮button17 = new按钮(“。”); 私人按钮button18 = new按钮(“根”号); 私人按钮button19 = new按钮(“平方”); 私人TextArea textarea1 = new TextArea(“0”); 公共leiyi() { 超级(“小小计算器”); / / GridLayout card1 = new GridLayout(5、4、5、5); / / setLayout(card1); setLayout(空); textarea1.setBounds(10、40270、50); button1.setBounds(90、50、50); button2.setBounds(85、90、50,50); button3.setBounds(155、90、50,50); button4.setBounds(225、90、50,50); button5.setBounds(15145年,50,50); button6.setBounds(85145年,50,50); button7.setBounds(155145年,50,50); button8.setBounds(225145年,50,50); button9.setBounds(15200年,50,50); button10.setBounds(85200年,50,50); button11.setBounds(155200年,50,50); button12.setBounds(225200、50105); button13.setBounds(15255年,50,50); button14.setBounds(85255年,50,50); button15.setBounds(155255年,50,50); button16.setBounds(225310年,50,50); button16.setForeground(Color.red); button16.setBackground(Color.pink); button17.setBounds(15310年,50,50); button18.setBounds(85310年,50,50); button19.setBounds(155310年,50,50); 添加(button1); 添加(button2); 添加(button3); 添加(button4); 添加(button5); 添加(button6); 添加(button7); 添加(button8); 添加(button9); 添加(button10); 添加(button11); 添加(button12); 添加(button13); 添加(button14); 添加(button15); 添加(button16); 添加(textarea1); 添加(button17); 添加(button18); 添加(button19); button1。addActionListener(新ActionListener() {公共空actionPerformed(ActionEvent e) { 如果(肖= = 0) { tmp1 = textarea1字符串。 getText(); 双a2 = Double.parseDouble(tmp1); 双a3 = a2 * 10 + 7.0; 字符串tmp4 = String.valueOf(a3);

文档评论(0)

f8r9t5c + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档