i am confused, the below program gets compiled but it does not show the button on the panel. i have tried adding null layout to panel with other program as but it doesn't come.
if there is a way to add null layout to a panel, please kindly tell me it is done.
import java.applet.Applet;
import java.awt.*;
//<
applet code=NullPanel.class height=300 width=400></applet>
public class NullPanel extends Applet
{
Button button=new Button("Click");
Panel p;
public void init()
{
setLayout(new FlowLayout());
p=new Panel();
p.setLayout(null);
p.add(button);
button.setBounds(20,20,20,20);
add(p);
}
}
thanks
nima lama