hi,
please look at the code below
import java.awt.*;
import java.applet.*;
public class
applet extends Applet
{
Panel p;
Button b;
public void init()
{
setLayout(new FlowLayout());
p=new Panel();
b=new Button("ok");
p.add(b) ;
setBackground(Color.red);
p.setBackground(Color.blue);// line 1
add(p);
setSize(200,150);
setVisible(true);
}
}
my question is that if i comment line 1 the panel takes the color red as background. How is this. is the panel by default transparent or else what is the answer
Regds.
Rahul