源码简介: |
class NumberListener implements ActionListener{ public void actionPerformed(ActionEvent e){ if (!append) { tf.setText("") append=true } String s=tf.getText() s+=e.getActionCommand() tf.setText(s) if (!btn[10].isEnabled()){ for(int i=10 i<=14 i++) btn[i].setEnabled(true) } }-class NumberListener implements ActionL istener (public void actionPerformed (Action Event e) (if (! append) (tf.setText ( "") append = true;) String s = tf.getText () s = e.getActionC ommand () tf.setText (s) if (! btn [10]. isEnabl ed ()) (for (int i = 10 i
|