Thank you. The repaint method needs a Rectangle object, and I'm not sure how to get one of those easily. Is there some kind of getRectangle method somewhere I can call to get a Rectangle which represents the JPanel? Or do I have to input four ints representing the position of the JPanel and height and width? Are the coordinates of the Rectangle relative to the JPanel, making the upper left corner of the JPanel equal to 0,0?