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();
return new Insets(4,4,5,5);
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);
philosopherArea.startPhilosophers();
philosopherArea.stopPhilosophers(); philosopherArea.createPhilosophersAndChopsticks(); philosopherArea.repaint();