📄 window.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package bt;import java.awt.*;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.*;/** * * @author Administrator */public class window extends JFrame implements ActionListener { private JFrame f; private JButton button; private JTextArea outputArea; public void print(String sq){ f=new JFrame("内容"); f.setSize(640,480); f.setVisible(true); button=new JButton("确定"); button.addActionListener((ActionListener) this); outputArea=new JTextArea(20,20); JPanel p=new JPanel(); p.add(outputArea); p.add(button); f.add(p,BorderLayout.CENTER); outputArea.setText(""); outputArea.append(sq+"\n"); } public void actionPerformed(ActionEvent e) { bton b=new bton(); f.setVisible(false); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -