I have the following (simplified example code):
This works so far.
Now I'd like to access above paint() method also in another (utility) class, to draw various things on screen, is this possible?
I have it working, I think:
Is this the corect (only) way to do it?
What concerns me a bit is that all public / proteced members members are now also in this class, but I actually don't need it there, I only want to access the paint() method from the other class..
I figured the simplest way is to pass g in the method calls, than I can acces it directly in my utility class.