// Make sure you do your import statements! // for example, these: import javax.swing.JPanel; import javax.swing.JFrame; public class Circles extends JPanel { public static void main( String args[] ) { // set up main program here, which will involve creating a JFrame // and embedding a panel in it. } public void paintComponent( Graphics g ) { // this is still the paintComponent method for the panel, // because this class extends JPanel } }