summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/examples/Listing3104.java
blob: 9ad4f120c6a562570a46b55fc10372693e46a0c2 (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
/* Listing3104.java */

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

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

  public Listing3104()
  {
    super("Test BorderLayout");
    addWindowListener(new WindowClosingAdapter(true));
    //Layout setzen und Komponenten hinzuf�gen
    setSize(300,200);
    setLayout(new BorderLayout());
    add(new Button("Button 1"), BorderLayout.NORTH);
    add(new Button("Button 2"), BorderLayout.SOUTH);
    add(new Button("Button 3"), BorderLayout.WEST);
    add(new Button("Button 4"), BorderLayout.EAST);
    add(new Button("Button 5"), BorderLayout.CENTER);
  }
}