FileDocCategorySizeDatePackage
FlowLayoutExample.javaAPI DocExample886Mon Sep 22 13:30:30 BST 1997None

FlowLayoutExample

public class FlowLayoutExample extends Applet

Fields Summary
Constructors Summary
Methods Summary
public voidinit()

    // Create and specify the layout manager for the applet container.
    // Leave 10 pixels of horizontal and vertical space between components.
    // Left justify rows.
    this.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
    String spaces = "";  // Used to make the buttons different sizes
    for(int i = 1; i <= 9; i++) {
      this.add(new Button("Button #" + i + spaces));
      spaces += " ";
    }