I wondered if anyone could advise?
I am trying to write a very simple target game in java, with a flying spaceship moving from left to right at the top of the JPanel.
I was trying to build a flying saucer, with a circle for the window part and oval for the main part.
I wondered how best to combin the two shapes, so I could move the two combined together using one set of x and y? Could I use the Area Class?
One solution might just be to have a draw(Graphics g) method in your SpaceShip class, which uses its x and y to draw itself however you want. Then call that method from the paintComponent(Graphics g) method you overrode, passing in the Graphics as a parameter.
Another idea, create an image in a BufferedImage and draw that in the paintComponent method.