import javax.swing.*;
import java.awt.*;
public class SimpleNotepad {
public static void main(String[] args) {
JFrame frame = new JFrame("简易记事本");
JTextArea textArea = new JTextArea();
JScrollPane scroll = new JScrollPane(textArea);
frame.add(scroll, BorderLayout.CENTER);
frame.setSize(500, 400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}import javax.swing.*;
import java.awt.*;
public class SimpleNotepad {
public static void main(String[] args) {
JFrame frame = new JFrame("简易记事本");
JTextArea textArea = new JTextArea();
JScrollPane scroll = new JScrollPane(textArea);
frame.add(scroll, BorderLayout.CENTER);
frame.setSize(500, 400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}import javax.swing.; import java.awt.;
public class SimpleNotepad { public static void main(String[] args) { JFrame frame = new JFrame("简易记事本"); JTextArea textArea = new JTextArea(); JScrollPane scroll = new JScrollPane(textArea);
frame.add(scroll, BorderLayout.CENTER);
frame.setSize(500, 400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}