I'm new to Java Graphics, and am developing an app that displays ships on top of an aerial view of a harbour. I followed some online tutorials and successfully used GeneralPath to draw ships within a class which extended JPanel. As we live and program in an object oriented world, I then decided to create a ShipShape class and delegate drawing of each ship to that class by way of sending a Graphics2D reference from the JPanel class to the ShipShape class constructor. This too was successful. Then I decided to take the next step and make each ShipShape instance run in its own thread, so each could exist independently of another. Each ship instance would also incorporate some simple animation, and so this also influenced my decision to use threads, so any animation could occur within a loop inside a run() method. Unfortunately, converting ShipShape to a Runnable class has not been successful - instances of ShipShape no longer draw to the screen inside the JPanel class.
I'm wondering if the Graphics2D reference passed to the ShipShape constructor gets broken now that ShipShape is a separate thread. I've attached a cut down version of my three classes below. Any help in solving this mystery would be greatly appreciated. Looking forward, I imagine fully grasping multi-threading in Java graphics must be a vital skill. Surely in any Java game the individual, animated, Java characters would exist within their own thread, yes?