Fix for TreePanel with no components. [1380]

Also javadoc updates.