Changing elements in a JScrollPane
Hi all,
I was wondering, is it possible to change the elements inside a JScrollPane. That is, say I had two buttons A and B. If I press button A, I would like the JScrollPane to display a JLabel in it, but If I press button B, I would like the scroll pane to display a JTree in it. All using the same scroll pane of course. Is this sort of functionality possible?
Thanks in advance.

