Board index » jbuilder » Background of panels

Background of panels


2003-09-03 07:18:52 AM
jbuilder3
Hello. I have a JPanel (jp_1) with a background set (a jpg image).
In its content is a JTabbedPane (jtp_1) , which contents are 2 or more
JPanels (jp_a, jp_b, ......).
I want the jp_1 background to be seen, either if it has any content inside,
let's say the jtp_1 and its panels.
I already tried with
jtp_1.setOpaque(false) ;
jp_a.setOpaque(false) ;
jp_b.setOpaque(false) ;
but I still have the gray color background of either the jtp_1 or the jp_a
or jp_b of the panels.
Could you please help me with this?
Thank you a lot.
 
 

Re:Background of panels

On 9/2/2003 at 7:18:52 PM, Mynor Paredes wrote:
Quote
I have a JPanel (jp_1) with a background set (a jpg image).

In its content is a JTabbedPane (jtp_1) , which contents are 2 or more
JPanels (jp_a, jp_b, ......).
I want the jp_1 background to be seen, either if it has any content
inside, let's say the jtp_1 and its panels.

I already tried with
jtp_1.setOpaque(false) ;
jp_a.setOpaque(false) ;
jp_b.setOpaque(false) ;

but I still have the gray color background of either the jtp_1 or the
jp_a or jp_b of the panels.
It seems that in order to fix some other bugs in JDK 1.4, Sun broke the
previous behavior. If you try your program on JDK 1.3, it should
behave as you expect.
Unfortunately, there does not seem to be any reasonable way to get back
the old behavior, since the change is embedded in the UI delegate. To
fix it, you would have to create a separate UI delegate subclass for
each look-and-feel that you might use.
For more information, see the following report on the Sun Bug Parade:
developer.java.sun.com/developer/bugParade/bugs/4685800.html
--
Regards,
John McGrath [TeamB]