Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Making a JPanel transparent

843805Sep 22 2006 — edited Sep 25 2006
In the application I am writing I want to allow for some popups on my interface. I am using a JLayeredPane, with two JPanels. The main JPanel, on the default layer, holds all the main components. A second JPanel, at the popup layer, will hold any components which should "pop up".

The layered pane is using a border layout, with both JPanels in the Center.

Unfortunately the bottom panel cannot be seen. It is covered by the top panel, even after I called setOpague(false) on the top panel.

Am I taking the wrong approach? Or is it just not possible to make a JPanel transparent?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2006
Added on Sep 22 2006
6 comments
633 views