debug13_2.java
来自「程序练习中包括书中实例程序代码和练习中要用到的代码,是压缩文件」· Java 代码 · 共 24 行
JAVA
24 行
package questions.c13;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Debug13_2 extends JFrame {
public Debug13_2( String titleText ) {
super( titleText );
addWindowListener( new WindowAdapter() {
public void windowClosing( WindowEvent e ) {
e.getWindow().dispose();
System.exit( 0 );
}
}
);
JTextArea ta
= new JTextArea( 80, 25, "Sample Text" );
getContentPane().add( ta, BorderLayout.CENTER );
pack();
setVisible( true );
}
public static void main( String[] args ) {
new Debug13_2( "Debug Question" );
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?