FileDocCategorySizeDatePackage
FramedArea.javaAPI DocExample1084Tue Dec 12 18:57:50 GMT 2000None

FramedArea

public class FramedArea extends Panel

Fields Summary
private PhilosopherArea
philosopherArea
Constructors Summary
public FramedArea(PhilAnimator controller)

        super();

        //Set layout to one that makes its contents as big as possible.
        setLayout(new GridLayout(1,0));

	philosopherArea = new PhilosopherArea(controller);
        add(philosopherArea);
        validate();
    
Methods Summary
public java.awt.InsetsgetInsets()

        return new Insets(4,4,5,5);
    
public voidpaint(java.awt.Graphics g)

        Dimension d = getSize();
        Color bg = getBackground();

        g.setColor(bg);
        g.draw3DRect(0, 0, d.width - 1, d.height - 1, true);
        g.draw3DRect(3, 3, d.width - 7, d.height - 7, false);
    
public voidstartButton()

	philosopherArea.startPhilosophers();
    
public voidstopButton()

	philosopherArea.stopPhilosophers();
	philosopherArea.createPhilosophersAndChopsticks();
	philosopherArea.repaint();