Hi, I'm having a weird issue that doesn't make sense to me. I have a Player class which has a draw method which draws a quad. I also have a healthBar object which also has a draw method that will draw another quad. Here's the structure this works under. Main() > Player.draw() > healthBar.draw().

When I create an instance of the healthbar and player in the main class, I can use Player.draw() and healthbar.draw(), it works fine. I'm just curious why I can't create this from within the Player class and call Player.draw() inside the main class to handle drawing both the player quad and healthbar quad. Is there something that prevents me from doing this? Thank you for your assistance.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org