/*Allows the user to add a vertex to to the bst*/ public void add(int data) { if (root == null) { root = new BinaryNode(data); root.setPositionX(1000); root.setPositionY(80); mainRoot = root; graphNode(root.getPositionX(), root.getPositionY(), data, 0); } else { if (search(data) != null) { txtTitle.Text = ("No duplicate vertex allowed!"); } else { add(data, root); } } }