jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes Graphics and JFrame paint Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Graphics and JFrame paint" Watch "Graphics and JFrame paint" New topic

Graphics and JFrame paint

Thomas Bigbee
Ranch Hand

Joined: Nov 29, 2001
Posts: 48
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

Joined: Jan 09, 2001
Posts: 1492
Hi Thomas,
No, but you could call any method you want from the overridden paint method inside the JFrame. For example:

I agree. Here's the link: http://aspose.com/file-tools
subject: Graphics and JFrame paint
It's not a secret anymore!