I have three panel.. consider panel1 ,panel 2 and panel3 The panel1's & panel2's Layout is Border Layout. The panel2 is added into panel1's Border Layout center.. The panel3 is added into panel2's Border Layout center...
Now i was not able to set the background color for panel3.... But if i add the panel3 into panel2's Border Layout east, (or west or south or north) then i can able to set background color..
only if i am put into border layout center then only i was not able to set background color...
whats reason? please anybody give solution...i will be thankful...
Don't know . . . but something makes me think you are adding the 3 panels on top of each other. If that is the case, then you have changed the colours, you just can't see them!
Is this what you are trying? If so, this worked just fine for me...
The reason yours may not be working is that the CENTER object will occupy all un-used space. The EAST and WEST are not the same. Give your panel 3 a preferred size and you will see it... [ July 30, 2008: Message edited by: Gil Estes ]
Hello everbody!
I too have a similar problem like karthik...
that my Frame class for tetrism and i can't seem to set the background color for any of the JPanels, the color is shown only ont the borders.
Please help if you can.