// demonstrate how to add things // Graphics! import javax.swing.*; import java.awt.*; public class AddStuff3 { public static void main(String[] args) { new MyGUI(); } } class MyGUI { private JFrame f; private Container c; private LayoutManager l; private MyPanel[] p; private int dim; public MyGUI() { makeWindow(); showWindow(); } private void makeWindow() { dim = 4; f = new JFrame("AddStuff3"); p = new MyPanel[dim*dim]; c = f.getContentPane(); l = new GridLayout(dim,dim,2,2); c.setLayout(l); for (int i=0;i