// Make sure you do your import statements! // for example, these: import javax.swing.JPanel; import javax.swing.JFrame; public class Circles { public static void main( String args[] ) { // set up main program here } } class CirclePanel extends JPanel { public void paintComponent( Graphics g ) { // draw the circles here, in the panel class } }