summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/examples/Listing2703.java
blob: 62b53606018ae0b13d95c0a42cb3803e3307de2f (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
31
32
33
/* Listing2703.java */

import java.awt.*;

public class Listing2703
{
  public static void main(String[] args)
  {
    Frame frame = new Frame("Anzeigezustand");
    frame.setSize(300,200);
    frame.setVisible(true);
    try {
      Thread.sleep(2000);
    } catch (InterruptedException e) {
      //nichts
    }
    frame.setState(Frame.ICONIFIED);
    try {
      Thread.sleep(2000);
    } catch (InterruptedException e) {
      //nichts
    }
    frame.setState(Frame.NORMAL);
    try {
      Thread.sleep(2000);
    } catch (InterruptedException e) {
      //nichts
    }
    frame.setVisible(false);
    frame.dispose();
    System.exit(0);
  }
}