creates a tree with mouse listener