# Java - Not Able To Change Panel Color



## Prashanti (Apr 24, 2006)

Hi!!

There is a java prg in which there are two panels within a panel. When I try to change the color of these panels it does not reflect the changes on screen when the prg is run.

I used the following code for changing background color:


```
p1.setBackground(new color(192,255,192));
```
Any ideas on why it doesn't respond???

Any help would be appreciated!!!


----------



## Chicon (Jul 29, 2004)

Hi Prashanti,

Without your coding, it's pratically impossible to help you solving the display problem.
BTW, refreshing GUI's can only be operated during an event treatment or by a separate thread.


----------

