johntom
johntom

Reputation: 25

how to draw ellipse over the jpanel

I have three classes: CanvasPanel, Drawline and DrawRectangle.

All three class are extending JPanel class.

Drag and drop of all component is going fine. But the problem is when I drag the line over the rectangle then line has been gone behind the rectangle. Can you give me the solution or give me some example, so I can understand how this is happening.

thanks

Upvotes: 0

Views: 338

Answers (1)

MvG
MvG

Reputation: 60858

Make the components transparent by calling setOpaque(false).

Upvotes: 1

Related Questions