Also you don't want to draw directly into a JFrame. Instead draw in the paintComponent override method of a JPanel or other class derived from JComponent. Be sure to call the super method first....