该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
具体的代码在这里:
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Scanner;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextArea;
import javax.swing.JTextField;
public class Program extends JFrame implements ActionListener {
JTextField txt1,txt2,txt3,txt4,txt5,txt6,max2,min2,avg2,sum2;
JLabel max1,min1,avg1,sum1,tishi;
private int[] numbers;
private JButton maxButton;
private JButton minButton;
private JButton averageButton;
private JButton sumButton;
private JButton saveButton;
private JButton exitButton;
public void init() {
setTitle("数字统计系统");
setSize(500,300);
setLayout(new GridLayout(4,8));
tishi=new JLabel("请输入6个数:");
add(tishi);
txt1=new JTextField("",5);
add(txt1);
txt2=new JTextField("",5);
ad