Is it possible for objects to paint themselves? At the moment, I have a JPanel with a paint method and all objects that I want painted I call from the paint method with an argument of the Graphics object.
This takes a long time and limits me with instances of certain objects that I don't know exist until runtime.
I'm sure it will probably be a very simple problem, but I don't know where to start.
Thank you in advance :)