• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Graphics object

 
Mathias Nilsson
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
I have a question on the graphics object!
I'm trying to make my first java game and just wonder.
Do I have to use the same graphics object that is passed to the paint() method in the applet? If I use another graphicsobject in another class then
It doesn't paint anything on the applet. It's just that it is very annoying
to pass the Graphics object to every other method.
Is there anybody who can tip me on what is good programming? I want
to have a paint method in another class so that the class can handle it's own painting.
// Mathias
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic