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

📄 example7_27.java

📁 不错的教程 适合中高级人员的使用
💻 JAVA
字号:
import java.awt.*;import java.awt.event.*;
class MyFrame extends Frame 
{  TextArea text;
   MyFrame(String s) 
   {  super(s);
      setBounds(100,100,200,300);setVisible(true);
      text=new TextArea(); add(text,BorderLayout.CENTER);
      addWindowListener(new WindowAdapter()
                      {   public void windowActivated(WindowEvent e)
                           { text.append("\n我被激活");
                           }
                           public void windowClosing(WindowEvent e)
                           {  System.exit(0);
                           }
                      }
                   );
      validate();
   }
}
class Example7_27
{  public static void main(String args[]) 
   {  new MyFrame("窗口");
   }
}

⌨️ 快捷键说明

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