谁能帮我编一个能加减乘除的计算器用JAVA~~要原代码

来源:百度知道 编辑:UC知道 时间:2024/06/05 08:44:20
编写一个能够执行加减乘除的简单的计算器的原代码~~
就像WINDOWS自带计算器~
谢谢!

/*
* NewJFrame.java
*
* Created on 31 May 2005, 03:10
*/

//package rcalculator;
import java.math.BigDecimal;
/**
*
* @author Greeceboy
*/
public class Rcalculator extends javax.swing.JFrame {

String s="";
String preNo="";
String nextNo="";
int markS=0;
boolean markE=false;

/** Creates new form NewJFrame */
public Rcalculator() {
initComponents();
}

/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
yellowUnder