您好,欢迎光临本网站![请登录][注册会员]  
文件名称: java实现简单的计算器
  所属分类: Java
  开发工具:
  文件大小: 1kb
  下载次数: 0
  上传时间: 2010-06-29
  提 供 者: yufan*****
 详细说明: 简单实用的计算器,面板设计简单, public testZ(){ super("计算器"); setSize(300,240); Container con=getContentPane(); con.setLayout(new BorderLayout()); jPanel1=new JPanel(); jPanel1.setLayout(new GridLayout(1,1)); jPanel2=new JPanel(); jPanel2.setLayout(new GridLayout(4,4)); resultField=new JTextField("0"); jPanel1.add(resultField); con.add(jPanel1,BorderLayout.NORTH); s1=new JButton(" 1 "); s1.addActionListener(this); s2=new JButton(" 2 "); s2.addActionListener(th is); s3=new JButton(" 3 "); s3.addActionListener(this); s4=new JButton(" 4 "); s4.addActionListener(this); s5=new JButton(" 5 "); s5.addActionListener(this); s6=new JButton(" 6 "); s6.addActionListener(this); s7=new JButton(" 7 "); s7.addActionListener(this); s8=new JButton(" 8 "); s8.addActionListener(this); s9=new JButton(" 9 "); s9.addActionListener(this); s0=new JButton(" 0 "); s0.addActionListener(this); b1=new JButton(" + "); b1.addActionListener(this); b2=new JButton(" - "); b2.addActionListener(this); b3=new JButton(" * "); b3.addActionListener(this); b4=new JButton(" / "); b4.addActionListener(this); f1=new JButton(" . "); f1.addActionListener(this); f2=new JButton(" = "); f2.addActionListener(this); jPanel2.add(s1); jPanel2.add(s2); jPanel2.add(s3); jPanel2.add(b1); jPanel2.add(s4); jPanel2.add(s5); jPanel2.add(s6); jPanel2.add(b2); jPanel2.add(s7); jPanel2.add(s8); jPanel2.add(s9); jPanel2.add(b3); jPanel2.add(s0); jPanel2.add(f1); jPanel2.add(f2); jPanel2.add(b4); con.add(jPanel2,BorderLayout.CENTER); ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: 计算器 java
 输入关键字,在本站1000多万海量源码库中尽情搜索: