JAVA程序填空题,

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 12:42:48
JAVA程序填空题,JAVA程序填空题,JAVA程序填空题,1publicclassCircleAreaCaculateimplementsActionListener2contentPane.set

JAVA程序填空题,
JAVA程序填空题,



JAVA程序填空题,
1 public class CircleAreaCaculate implements ActionListener
2 contentPane.setLayout(new BorderLayout()) ; //这句废话,因为默认就是BorderLayout
3 JPanel p = new JPanel(new GridLayout(2,2));
4 areaTf.setEditable(false);
5 caculateBt.addActionListener(this);
6 frame.setSize(300,150);
7 Double.parseDouble(radioTf.getText());
8 double area = Math.PI * radio * radio;
9 areaTf.setText(""+area);
10 NumberFormatException xe