Java Reference
In-Depth Information
LISTING 6.7
continued
BoxesPanel panel =
new
BoxesPanel();
frame.getContentPane().add(panel);
frame.pack();
frame.setVisible(
true
);
}
}
DISPLAY
LISTING 6.8
//********************************************************************
// BoxesPanel.java Author: Lewis/Loftus
//
// Demonstrates the use of conditionals and loops to guide drawing.
//********************************************************************
import
javax.swing.JPanel;
import
java.awt.*;
import
java.util.Random;
Search WWH ::
Custom Search