📄 word2.java
字号:
package yu2;
import java.beans.PropertyVetoException;
import javax.swing.JInternalFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
public class word2 extends JInternalFrame {
private JTextArea ta1;
private static int i=0;
word2(){
super("文档"+(i+1),true,true,true,true);
this.setSize(300,400);
ta1=new JTextArea();
this.getContentPane().add(new JScrollPane(ta1));
this.setLocation(20*i,15*i);
i++;
this.setVisible(true);
}
public void copy(){
this.ta1.copy();
}
public void cut(){
this.ta1.cut();
}
public void paste(){
this.ta1.paste();
}
public void huanhang(){
this.ta1.setLineWrap(true);
}
public void nothuanhang(){
this.ta1.setLineWrap(false);
}
public void close(){
try {
this.setClosed(true);
} catch (PropertyVetoException e) {
e.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -