dkfr.net
当前位置:首页 >> 用jAvA编写计算器 >>

用jAvA编写计算器

import java.awt.BorderLayout; import java.awt.Color; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.sw...

我写了个整数可以使用的, 你可以研究一下, 添入小数部分 功能和window7自带的那个一样 import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.sw...

给你个现成的,直接编译运行,请采纳import java.awt.BorderLayout;import java.awt.Color;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;import javax.swing....

下面文件名要为:JiSuanQi.java import java.awt.*; import java.awt.event.*; public class JiSuanQi { String s="",s1=null,s2=null; Frame f=new Frame("计算器"); TextField tf=new TextField(30); Panel p1=new Panel(); Panel p2=new Pane...

给你一个参考,希望不要被百度吞了当晚餐 import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.text.DecimalFormat; import javax.swing.JButton;...

有一个现成的参考一下吧 import java.awt.event.ActionEvent; public class Application extends JFrame { protected String str = ""; protected boolean isChar = true; protected boolean isEqual = false; protected JTextField textField; ...

我觉得是double y=0d;y是double类型的变量,赋初值为0,把d去了也可以。

有一个现成的.你看看吧 import java.awt.event.ActionEvent; public class Application extends JFrame { protected String str = ""; protected boolean isChar = true; protected boolean isEqual = false; protected JTextField textField; p...

import javax.swing.*; import java.awt.event.*; import java.awt.*; public class Calculator extends JFrame implements ActionListener { private JFrame jf; private JButton[] allButtons; private JButton clearButton; private JTextFie...

import java.awt.*; import java.awt.event.*; class Calculate extends Frame implements ActionListener { TextField t1=new TextField(5); //第一个操作数文本框 TextField t2=new TextField(5); //运算符文本框 TextField t3=new TextField(...

网站首页 | 网站地图
All rights reserved Powered by www.dkfr.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com