Davy, I'm looking at the book, and basically they are telling you in those two paragraphs on page 364 what Ken said. You create a JFrame and add the JPanel to it. When the frame is displayed, the panel's paintComponent will be called. You can't create a Graphics object yourself.
posted 12 years ago
but I am still none the wiser as to how to get this to work!
and how do i put the graphics argument in? I mean what am I using? I can't call this method without the argument and that argument should be the same object.