Forums Register Login

Graphics and JFrame paint

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Hi Thomas,
No, but you could call any method you want from the overridden paint method inside the JFrame. For example:

Regards,
Manfred.
Get meta with me! What pursues us is our own obsessions! But not this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1092 times.
Similar Threads
Query on use of paint(Graphics g) method
How do you draw in a frame?
JFrames Within Applets/JApplets
objects with listeners
Graphics2D on JPanel
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:56:11.