Originally Posted by
Joe Moer
Sorry to start this up again, but I cant seem to get Kevin's method to work. How do I call your PaintComponent() method? Thats giving me problems. Also, say now my jFrame is from another class called Game. How do call super on that? Not that I got the paintComponent method to work in the first place. Also what is the repaint() method doing in the 60FPS loop? Is it doing anything?
Please can you help me get Kevins method to work
. Thanks.
Can you post what you have so far, preferably in SSCCE form (like what I posted: short, runnable, demonstrates the point)?
But basically, the paintComponent method has to be in a class that extends JComponent (or JPanel), then you add that component to your window wherever you want the drawn "stuff" to be.