JAVA点击按钮显示文本框,再点击按钮保存

来源:百度知道 编辑:UC知道 时间:2024/05/22 16:22:27
JAVA点击按钮显示文本框,再点击按钮保存 考试要用 一点前有效 谢谢~!!!

不明白什么意思啊~~ 是点击按钮后 弹出文本框,还是本来没有文本框,点击按钮显示了,还有个保存按钮呢?

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextArea;

public class Qxiaoi {
private JFrame frame;
private JPanel panel;
private JTextArea textArea;
private JButton buttonC, buttonS;
private boolean isNull = true;

public Qxiaoi() {
frame = new JFrame();
panel = new JPanel();
textArea = new JTextArea(10, 10);
buttonC = new JButton("检查");
buttonS = new JButton("保存");
init();
addActionHandle();
}

private void init() {
frame.add(panel);
panel.add(tex