?? selecttext.java
字號(hào):
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class SelectText extends Applet implements ActionListener
{
Label l=new Label("TextArea And TextField");
TextField tf=new TextField(40);
TextArea ta=new TextArea("Please select the string which you want in the TextArea\nand then please click the button \"copy\"\nthen the select string will be copied to the TextField",3,50);
Button bt=new Button("copy");
public void init()
{
add(l);
add(ta);
add(bt);
add(tf);
bt.addActionListener(this);
}
public void actionPerformed(ActionEvent evt)
{
String s;
s=ta.getSelectedText();
if(evt.getActionCommand().equals("copy"))
tf.setText(s);
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -