0

I have the following Problem: I have a JLayeredPane and I need to add a Circle and some Lines to it. The Problem wit the Lines is, that they should be able to be redrawn/to move position (The Lines Symbolize some moving Vectors) When I just add some GLines to the Graphics JLayeredPane.getGraphics() they are permanent. Or is there any possibility to Redraw the JLayeredPane.getGraphics()?

Please Help!

mKorbel
  • 109,525
  • 20
  • 134
  • 319
keykiller91
  • 135
  • 1
  • 1
  • 6

1 Answers1

1

LinePanel shows one approach, but it can be adapted to any Shape. For many lines, your program might maintain a List<Shape>. In any case the example may serve as a foundation for your sscce.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045