summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/examples/Listing3103.java
blob: 0e6d6843461feadee375b4282a58f158f56e54c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* Listing3103.java */

import java.awt.*;
import java.awt.event.*;

public class Listing3103
extends Frame
{
  public static void main(String[] args)
  {
    Listing3103 wnd = new Listing3103();
    wnd.setVisible(true);
  }

  public Listing3103()
  {
    super("Test GridLayout");
    addWindowListener(new WindowClosingAdapter(true));
    //Layout setzen und Komponenten hinzuf�gen
    setLayout(new GridLayout(4,2));
    add(new Button("Button 1"));
    add(new Button("Button 2"));
    add(new Button("Button 3"));
    add(new Button("Button 4"));
    add(new Button("Button 5"));
    add(new Button("Button 6"));
    add(new Button("Button 7"));
    pack();
  }
}