Background of JPanel [message #59575] |
Sat, 11 September 2004 04:01  |
Eclipse User |
|
|
|
Originally posted by: arik.funke.gmx.de
Hello,
I have a JPanel in a JFrame and am trying to change its backgroud colour.
However changes of the background property of the JPanel do not take
effect. Nevertheless, if I change the background property of an isolated
JFrame it does work. What am I doing wrong? Shouldn't it work exactly
analoguely?
Cheers,
Arik
|
|
|
Re: Background of JPanel [message #59650 is a reply to message #59575] |
Mon, 13 September 2004 05:07  |
Eclipse User |
|
|
|
Arik Funke wrote:
> Hello,
> I have a JPanel in a JFrame and am trying to change its backgroud colour.
> However changes of the background property of the JPanel do not take
> effect. Nevertheless, if I change the background property of an isolated
> JFrame it does work. What am I doing wrong? Shouldn't it work exactly
> analoguely?
> Cheers,
> Arik
Hi Arik,
May be the JPanel haves the opaque property set to false? Try
myPanel.setOpaque(true).
Francesc Rosés
|
|
|
Re: Background of JPanel [message #598384 is a reply to message #59575] |
Mon, 13 September 2004 05:07  |
Eclipse User |
|
|
|
Arik Funke wrote:
> Hello,
> I have a JPanel in a JFrame and am trying to change its backgroud colour.
> However changes of the background property of the JPanel do not take
> effect. Nevertheless, if I change the background property of an isolated
> JFrame it does work. What am I doing wrong? Shouldn't it work exactly
> analoguely?
> Cheers,
> Arik
Hi Arik,
May be the JPanel haves the opaque property set to false? Try
myPanel.setOpaque(true).
Francesc Rosés
|
|
|
Powered by
FUDForum. Page generated in 0.03245 seconds