zoukankan      html  css  js  c++  java
  • 每个容器都有一个布局管理器

    布局管理器(LayoutManager):每个容器都有一个布局管理器,当容器需要对某个组件进行定位或判断其大小、尺寸时,就会调用其对应的布局管理器。

    使用布局管理器可以实现跨平台的特性,并且获得动态的布局效果。

    布局管理器负责管理组件的排列顺序、大小和位置。

    不同的布局管理器使用不同的布局策略,容器可以通过选择不同的布局管理器来决定如何布局。

     1 package TomAwt;
     2 
     3 
     4 import java.applet.Applet;
     5 import java.awt.*;
     6 public class TomAwt_17 extends Applet{
     7     private TextArea textArea1,textArea2;
     8     public void init()
     9     {
    10         //creating 2 10*20 TextAreas
    11         textArea1=new TextArea("Read-only Text!",10,20);
    12         textArea2=new TextArea(10,20);
    13         //set textArea1 read-only
    14         textArea1.setEditable(false);
    15         add(textArea1);
    16         add(textArea2);
    17     }
    18 }
  • 相关阅读:
    对于“口袋精灵”单元测试
    12-17:项目进度
    12-15:项目进度
    12-14:项目进度
    12-13:项目进度
    12-12:项目进度
    12-11:项目进度
    12-10:项目进度
    12-9:项目进度
    12-6:项目进度
  • 原文地址:https://www.cnblogs.com/borter/p/9425441.html
Copyright © 2011-2022 走看看