java计算器程序代码 简单点

来源:百度知道 编辑:UC知道 时间:2024/06/07 01:38:18
简单一点!
最好是自己写的

给你发了 注意查收!

http://zhidao.baidu.com/question/57277657.html

给你,自己看吧

我有 你留个邮箱 发你

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class Counter extends JApplet{
private Label l=new Label("输入数字");
private Label l1=new Label("输入数字");
private Label l2=new Label("总数");
private TextField tf=new TextField(20);
private TextField tf1=new TextField(20);
private TextField tf2=new TextField(20);
private Button b=new Button(" + ");
private Button b1=new Button(" - ");
private Button b2=new Button(" * ");
private Button b3=new Button(" / ");
public void init(){
Container c= getContentPane();
b.addActionListener(new ActionLis