frame1_help.java~3~
来自「简单java实现的FTP客户端」· JAVA~3~ 代码 · 共 58 行
JAVA~3~
58 行
package emptyframe;import java.awt.*;import java.awt.event.*;import javax.swing.*;import javax.swing.border.*;import com.borland.jbcl.layout.*;abstract class Frame1_Help extends JDialog implements ActionListener { JScrollPane jScrollPane1 = new JScrollPane(); JButton jButton1 = new JButton(); JTextArea jTextArea1 = new JTextArea(); public Frame1_Help(Frame parent) { super(parent); enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { this.setTitle("帮助文档"); this.getContentPane().setLayout(null); setResizable(true); jScrollPane1.setBounds(new Rectangle(1, 0, 397, 325)); jButton1.setBounds(new Rectangle(312, 335, 82, 25)); jButton1.setText("确定"); jButton1.addActionListener(this); this.getContentPane().add(jScrollPane1, null); jScrollPane1.getViewport().add(jTextArea1, null); this.getContentPane().add(jButton1, null); } //Overridden so we can exit when window is closed protected void processWindowEvent(WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { cancel(); } super.processWindowEvent(e); } //Close the dialog void cancel() { dispose(); } //Close the dialog on a button event public void actionPerformed(ActionEvent e) { if (e.getSource() == jButton1) { cancel(); } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?