I found this code in one of the mock exams.
import java.applet.*;
import java.awt.*;
public class Q20 extends Applet
{
Button okButton = new Button("Ok");
public void init()
{
setLayout(new BorderLayout());
add("South", okButton);
add("North", okButton);
add("East", okButton);
add("West", okButton);
add("Center", okButton);
setSize(300,300);
}
}
Why does it generate only one button with ok label occupying the whole applet?
Thanx
Sonali