If I can ask you another question: In my Tree, when I select a node, I open a file. But in my tree, nodes are not selected when I click on this. Do you know how resolve it ?? Thanks
I don't know. I'm not programming GUI generally so my knowledge in swing is reduce.
But things are quite easy as far as I know. So try to read java tutorial on JTree or search on google with the right keys and you we'll find what you need.
You did not indicate what MyMenu is but I am assuming it is some JPanel component. Basically you need to apply a layout to the JPanel to define how you'd like your lay out components (like your scrollpane) on your JPanel (mymenu).
Get a good GUI book with examples using different layout managers to see which one will work best for you.