Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Graphics and JFrame paint

 
Thomas Bigbee
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JFrame which has been extended
I create an instance of a (non-graphical) class - passing a copy of the JFrame reference
what I want to do is override the paint method for the JFrame object from within the other class
Is there a way to do this?
Thanks, Tom
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Thomas,
No, but you could call any method you want from the overridden paint method inside the JFrame. For example:

Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic