How to set a Transparent Background of JPanel

Posted by Imran on Stack Overflow See other posts from Stack Overflow or by Imran
Published on 2010-03-30T12:45:59Z Indexed on 2010/03/30 12:53 UTC
Read the original article Hit count: 557

Filed under:
|
|
|

Hi,

I need to know if a JPanel`s bacground can be set to Transparent?

My frame is has two Jpanels Image Panel and Feature Panel, Feature Panel is overlapping Image Panel, the Image Panel is working as a background and it is loading image from a remote Url, now I want to draw shaps on Feature Panel , but now Image Panel cannot be seen due to Feature Panel's background color. I need to make Feature Panel background transparent while still drawing its shapes and i want Image Panel to be visible since it is doing tiling and cache function of images. I need to seperate the image drawing and shape drawing thats why I`m using two jPanels! is there anyway the overlapping Jpanel have a transparent background?

thanks

© Stack Overflow or respective owner

Related posts about jpanel

Related posts about swing