📄 jtextareademo.java
字号:
import java.awt.*;
import javax.swing.*;
public class JTextAreaDemo extends JFrame
{
public JTextAreaDemo()
{
super( "JTextAreaDemo" );
// 获取content pane并设置布局管理器
Container container = getContentPane();
container.setLayout( new FlowLayout() );
JTextArea textArea = new JTextArea( 4, 20);
container.add( textArea );
setSize( 300,120 );
setVisible( true );
}
public static void main( String s[] )
{
JTextAreaDemo jtad = new JTextAreaDemo();
jtad.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -