//CS112 Spring 2008 //Homework 4 import java.awt.Graphics; import javax.swing.*; public class displayWindow extends javax.swing.JFrame { BinarySearchTree tree; //tree that it is displaying public displayWindow(BinarySearchTree tree) { this.tree = tree; setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); //closing this window will terminate the program that launched it, but it is okay to have multiple //windows open setSize(500,1000); setTitle("DisplayWindow"); } public void paint(Graphics g) { super.paint(g); tree.addGraphics(g); //you will need to implement the addGraphics function in your BST class } }