blob: f40b445657eb2251ca66efb57ed92418e061483c (
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
|
/* Listing3107.java */
import java.awt.*;
import java.awt.event.*;
public class Listing3107
extends Frame
{
public static void main(String[] args)
{
Listing3107 wnd = new Listing3107();
wnd.setVisible(true);
}
public Listing3107()
{
super("Dialogelemente ohne Layoutmanager");
addWindowListener(new WindowClosingAdapter(true));
//Layout setzen und Komponenten hinzuf�gen
setSize(300,250);
setLayout(null);
for (int i = 0; i < 5; ++i) {
Button button = new Button("Button"+(i+1));
button.setBounds(10+i*35,40+i*35,100,30);
add(button);
}
}
}
|