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

📄 app15_16.java

📁 JAVA 2面向对象程序设计(随书范例程序)13-15.rar
💻 JAVA
字号:
// app15_16, FlowLayout类的使用
import java.awt.*;
public class app15_16
{
   static Frame frm=new Frame("Flow Layout"); 
   public static void main(String args[])
   {
      FlowLayout flow=new FlowLayout(FlowLayout.CENTER,5,10);
      frm.setLayout(flow);    // 设置版面配置为流动式
      frm.setSize(200,150); 
      frm.setBackground(Color.yellow);  
      frm.add(new TextField("This",8));   // 加入文本框
      frm.add(new TextField("is",6));     // 加入文本框
      frm.add(new TextField("Flow Layout",16)); // 加入文本框
      frm.setVisible(true);      
   }
}

⌨️ 快捷键说明

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