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

📄 hw16_13.java

📁 java的一些关于多线程
💻 JAVA
字号:
import java.awt.*;
import java.awt.event.*;
public class hw16_13 extends Frame
{
   static hw16_13 frm=new hw16_13(); 
   static TextArea txa1;
   static TextArea txa2;
   
   public static void main(String args[])
   {
      txa1=new TextArea("",6,10,TextArea.SCROLLBARS_NONE);
      txa2=new TextArea("",6,10,TextArea.SCROLLBARS_NONE);
      frm.setSize(200,150);
      frm.setTitle("Text Event");
      frm.setLayout(new FlowLayout(FlowLayout.CENTER));
      txa1.addTextListener(new textval());   
      txa2.setEditable(false);     
      frm.add(txa1);      
      frm.add(txa2);
      frm.setVisible(true); 
   }
   static class textval implements TextListener
   {
      public void textValueChanged(TextEvent e)  
      {
         txa2.setText(txa1.getText());
      }
   } 
} 

⌨️ 快捷键说明

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