《JAVA计算器代码》word版
import j__a.awt.*; import j__a.awt.event.*;public class Cal { public static void __in(String[] arg
importj__a.awt.*; importj__a.awt.event.*; publicclassCal{ publicstaticvoid__in(String[]args){ CalFramef=newCalFrame(); } } classCalFrameextendsFrame{ doubled1,d2; intop=-1; TextFieldtf; CalPanelLp1; CalPanelRp2; //Constructor CalFrame(){ super("__allCalculator"); setLayout(newFlowLayout(FlowLayout.__NTER,8,10)); setBackground(newColor(100,150,150)); setForeground(Color.white); setResizable(false); setSize(300,200); tf=newTextField(22); tf.setEditable(false); tf.setBackground(newColor(108,118,103)); tf.setForeground(Color.white); tf.setFont(newFont("Arial",Font.BOLD,16)); add(tf); p1=newCalPanelL(); p2=newCalPanelR(); add(p1); add(p2); setVisible(true); addWindowListener(newWclose()); } //innerclass:CalButton classCalButtonextendsButton{ CalButton(Strings){

