import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class FrameSample extends JPanel 
{
    PartA A;
    PartB B;
    PartA C;

    public FrameSample ()
    {
	super (new BorderLayout());
	//setBackground (Color.white);
	A = new PartA();
	B = new PartB();
	C = new PartA();
	add(A,"North");
	add(B, "Center");
	add(C, "South"); 
    }

    public static void main (String [] args)
    {
	//Make sure we have nice window decorations.
	JFrame.setDefaultLookAndFeelDecorated (true);

	//Create and set up the window.
	JFrame frame = new JFrame ("Frame Demo");
	frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);

	//Create and set up the content pane.
	JComponent newContentPane = new FrameSample ();
	newContentPane.setOpaque (true); //content panes must be opaque
	frame.setContentPane (newContentPane);
	frame.setSize (300, 150);

	//Display the window.
	// frame.pack ();
	frame.setVisible (true);
    }
}

