Repaint without clearing?

As you've discovered, you need to call super. PaintComponent(g) otherwise, the JPanel background doesn't get painted and everything is a mess. The problem is that only one shape can be drawn at any one time as the draw field can only be a single value.

One solution would be to create an ArrayList of shapes and draw each shape in the List in paintComponent .

Custom Painting Approaches shows the two common solutions to this problem.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions