//: c14:Box3.java
// 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);
}
} ///:~