//:Ex9.java

import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
import javax.swing.border.*;
import javax.swing.table.*;
import javax.swing.event.*;
import javax.swing.tree.*;
import java.io.*;
import java.net.*;



public class Ex9 extends JFrame { 

	//Primitives ...
	//Collections ...

	 public Ex9 () {
		Container container = null; 
		JButton B1 = null; 
		JButton B2 = null; 
		JButton B3 = null; 
		JButton B4 = null; 
		JButton B5 = null; 

		container  = this.getContentPane();
		setTitle("F1"); 
		setVisible(true); 
		setSize(300,300); 
		setLocation(10,50); 

		container.setLayout( new BorderLayout(5, 5)); 
		B1 = new JButton();
		B1.setText("North Button");
		container.add(B1, "North" ); 

		B2 = new JButton();
		B2.setText("South Button");
		container.add(B2, "South" ); 

		B3 = new JButton();
		B3.setText("East Button");
		container.add(B3, "East" ); 

		B4 = new JButton();
		B4.setText("West Button");
		container.add(B4, "West" ); 

		B5 = new JButton();
		B5.setText("Center Button");
		container.add(B5, "Center" ); 

	}

	// Methods ... 

	// Models .. 

	// Model Class .. 

	public static void main(String[] args)  { 
		Ex9 Ex91 = new Ex9();
		Ex91.show();
		Ex91.addWindowListener( new WindowAdapter()  {
			public void windowClosing(WindowEvent we)   {
				 System.exit(0);
		}} );
	}

}

