A Swing component can only have a single parent:
First you create a JScrollpane and add the JTree to the scroll pane which is correct.
But then you add the JTree to the JPanel which removes the JTree from the JScrollPane, which is wrong.
Also, don't use setBounds(). Swing was designed to be used with layout managers. The layout manager will determine the size/location of components.
Read the section from the Swing tutorial on
How to use Trees for a working example.
If you still have problems then post a proper
SSCCE that demonstrates the problem.