//: c13:Box3.java
// Przykład z książki 'Thinking in Java, wydanie 2.', autor - Bruce Eckel
// www.BruceEckel.com
// Patrz informacje o prawach autorskich podane w pliku CopyRight.txt.
// Używanie Kleju.
// <applet code=Box3
// width=450 height=300> </applet>
import javax.swing.*;
import java.awt.*;
import com.bruceeckel.swing.*;
public class Box3 extends JApplet {
public void init() {
Box bv = Box.createVerticalBox();
bv.add(new JLabel("Witaj"));
bv.add(Box.createVerticalGlue());
bv.add(new JLabel("Świecie"));
bv.add(Box.createVerticalGlue());
bv.add(new JLabel("Apletów"));
Box bh = Box.createHorizontalBox();
bh.add(new JLabel("Witaj"));
bh.add(Box.createHorizontalGlue());
bh.add(new JLabel("Świecie"));
bh.add(Box.createHorizontalGlue());
bh.add(new JLabel("Apletów"));
bv.add(Box.createVerticalGlue());
bv.add(bh);
bv.add(Box.createVerticalGlue());
getContentPane().add(bv);
}
public static void main(String[] args) {
Console.run(new Box3(), 450, 300);
}
} ///:~