The problem is when the frame launches, there is no background color set.
but when I resize it, the background shows the color which i set but only during resizing.
What might be the problem and how to remove it.
Setting the background of the frame doesn't work because "the content pane" is added to the frame, so you see the background of the content pane. So you need to set the background color of the content pane.