学java的时候自己编的,很简单,能够连续输入计算式后进行计算import java.awt.BorderLayout;import java.awt.Color;import java.awt.FlowLayout;import java.awt.Font;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.text.NumberFormat;import java.util.ArrayList;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.JTextField;/**简易芦差隐计陪厅算器,能够进行简单的计算 * * @see 2008.12.9*/public class CalculatorA implements ActionListener{ private JFrame frame; private JTextField field; private JButton[] allButtons; private JButton clearButton;// private JButton backButton; String result="";//保存结果 StringBuilder sb = new StringBuilder();//保存要进行的计算式 int x = 0; //用来判断上一次的事件类型 String str = "123+456-789*0.=/"; ArrayList