Introduction - If you have any usage issues, please Google them yourself
import java.awt.*
import java.awt.event.*
public class Calculator implements ActionListener
{
String s= " ",s1
double d1,d2
JFrame jf = new JFrame( "计算器 ")
JTextField tf = new JTextField()
public void init()//实现计算器界面
{
Container c=jf.getContentPane()
tf.setHorizontalAlignment(JTextField.RIGHT) //文本框
c.add(tf, "North ")
JPanel pn3 = new JPanel(new BorderLayout(