FileDocCategorySizeDatePackage
BordLayDemo2.javaAPI DocExample1223Sat Nov 25 12:55:12 GMT 2000None

BordLayDemo2

public class BordLayDemo2 extends Frame
BorderLayout demo. East and West have different widths, and North and South have different heights.

Fields Summary
String[]
cp
static final int
NORTH
static final int
EAST
static final int
SOUTH
static final int
WEST
static final int
CENTER
MyCanvas[]
canvases
Constructors Summary
BordLayDemo2(String s, BitSet b)


	    
		super(s);
		setLayout(new BorderLayout());
		for (int i = 1; i<=5; i++)
			if (b.get(i))
				add(cp[i], canvases[i]);
		pack();
		setVisible(true);
	
Methods Summary
public static voidmain(java.lang.String[] av)

		BitSet b = new BitSet();
		b.set(NORTH);
		b.set(EAST);
		b.set(SOUTH);
		b.set(WEST);
		b.set(CENTER);
		new BordLayDemo2("All", b);

		b.clear(CENTER);
		new BordLayDemo2("Compass", b);

		b.set(CENTER);
		b.clear(NORTH);
		b.clear(SOUTH);
		new BordLayDemo2("Horizontal", b);

		b.set(NORTH);
		b.set(SOUTH);
		b.clear(EAST);
		b.clear(WEST);
		new BordLayDemo2("Vertical", b);