blob: fa6b6e280e88bfe695843a66aa7519fe5b5c4562 (
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
|
/* Listing3405.java */
import java.awt.*;
import java.awt.event.*;
public class Listing3405
extends Frame
{
public static void main(String[] args)
{
Listing3405 wnd = new Listing3405();
}
public Listing3405()
{
super("Bitmap-Komponente");
setBackground(Color.lightGray);
setSize(250,150);
setVisible(true);
//Hinzuf�gen der Komponenten
setLayout(new GridLayout(2,2));
add(new BitmapComponent("duke.gif"));
add(new BitmapComponent("duke.gif"));
add(new BitmapComponent("duke.gif"));
add(new BitmapComponent("duke.gif"));
pack();
//WindowListener
addWindowListener(new WindowClosingAdapter(true));
}
}
|