import javax.swing.JFrame;
import java.awt.Color;


public class BinaryTree<Content> {
	private Content content;
	private BinaryTree<Content> left;
	private BinaryTree<Content> right;
	


	/** post:	this tree has been instantiated 
	 * 			and getContent() == c
	 * 			and  leftSubtree() == lt  and  rightSubtre() == rt	 */
	public BinaryTree(Content c, BinaryTree<Content> lt, BinaryTree<Content> rt) {
		content = c;
		left = lt;
		right = rt;
	}
	
	/**	post:	leftSubtree() == t */
	public void setLeftSubtree(BinaryTree<Content> t) {
	}
	
	/**	post:	rightubtree() == t */
	public void setRightSubtree(BinaryTree<Content> t) {
	}
	
	/**	post:	getContent() == c */
	public void setContent(Content c) {
	}
	
	/**	post:	result == the content of root node of this tree  */
	public Content getContent() {
	}
	
	/**	post:	result == the left subtree of this tree */
	public BinaryTree<Content> leftSubtree() {
	}
	
	/**	post:	result == the right subtree of this tree */
	public BinaryTree<Content> rightSubtree() {
	}
	
	/**	post:	result == the height of this tree */
	public int treeHeight() {
	}
	
	
	
	/**	post:	this tree has been displayed graphically in a JFrame of height h */
	public void display(int h) {
		int treeHt = treeHeight();
		JFrame win = new JFrame("Binary Tree Image");
		win.setBounds(10, 10, treeHt*55, h);
		win.setLayout(null);
		win.setBackground( Color.WHITE );
		BinTreeComponent<Content> btComponent = new BinTreeComponent<Content>(treeHt, this);
		btComponent.setBounds(0, 0, win.getWidth(), win.getHeight());
		win.add(btComponent);
		win.setVisible(true);
		win.repaint();
	}
}
