but i cant figure out how to draw it in the main game class. ive tried putting mainBall.paint(g); in the main paint method but that gives me an error
sorry about all the questions lol. my brain is going way too fast and i cant slow down
I think it is a good time to start following the usual naming conventions for stuff (it helps a lot when all the people looking at the code can quickly know what's going on).
The basics of that would be to name:
classes start with a capital letter and have a capital letter at the start of each word (public class ThisIsAClass).
variables start with a lowercase letter and have a capital letter at the start of each word (int whatALongVariableName).
methods are named like variables (public void cantWeAllJustGetAlong()).
So with that tidbit out of the way, as always, you'll want to post what error you get and what line of code it happens on whenever you code is giving you an error.
As a guess, perhaps your mainBall object isn't named mainBall. I can confirm that that is your class name. So if you have a variable declared mainBall player, you'd want to call player.paint(g).