keykiller91
keykiller91

Reputation: 135

Java: JLayeredPane and Lines or Circles

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!

Upvotes: 0

Views: 252

Answers (1)

trashgod
trashgod

Reputation: 205785

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.

Upvotes: 1

Related Questions