⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 textcomponentevent.java

📁 有大量的java的实例
💻 JAVA
字号:
import java.applet.*;
import java.awt.*;
import java.awt.event.*;

public class TextComponentEvent extends Applet  implements TextListener,ActionListener
{
 TextField tf;
 TextArea ta;
 public void init()
 {
  tf = new TextField(45);
  ta = new TextArea(10,45);
  add(tf);
  add(ta);
  tf.addActionListener(this);
  tf.addTextListener(this);
 }
 public void textValueChanged(TextEvent e)
 {
  if(e.getSource()==tf)
    ta.setText(((TextField)e.getSource()).getText());
 }
 public void actionPerformed(ActionEvent e)
 {
  if(e.getSource()==tf)
  ta.setText("");
 }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -