import java.awt.*;
import java.applet.Applet;
public class PanelUseBdr extends Applet
{
  	Panel pn1 = new Panel();
  	BorderLayout bdr = new BorderLayout (4,4);
  	Button bt2 = new Button ("2");
  	Button bt4 = new Button ("4");
  	Button bt6 = new Button ("6");
  	Button bt8 = new Button ("8");
  	Button bt21 = new Button ("21");
  	public void init()
  	{
		pn1.setLayout (bdr);
		pn1.add("South",bt21);
		pn1.add("West",bt2);
		pn1.add("East",bt4);
		pn1.add("North",bt6);
		pn1.add("Center",bt8);
		pn1.setBackground (Color.green);
		add (pn1);
  	}
}

Click here to go back.

Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus




Footer1