added delete function

used keyPressed() to run a delete function if the key pressed is "b", handles all exceptions, can deselect nodes, works like a charm