[Original] Java flow layout manager FlowLayout

Parameters Prototype:

public FlowLayout(int align, int hgap, int vgap) {

  this.hgap = hgap;
  this.vgap = vgap;
  setAlignment(align);
}

The first parameter value (0,1,2), Left 0, 1, 2 centered, right justified

The second horizontal pitch parameter

The third parameter vertical spacing

Example of use: container.setLayout (new FlowLayout (0, 10, 10));

 

Guess you like

Origin www.cnblogs.com/guorongtao/p/11258411.html