Link to home
Start Free TrialLog in
Avatar of aquasw
aquasw

asked on

JScrollPane with static background Image

Hi all

I have a JPanel with BG image on it.
I used the getViewport().setView(iPanel); in order to put the panel inside the JScrollPane.
Now I want the bg Image to saty in it place and not to move when the user scrolls. ( the JPanel cotains a JTree )

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
also ensure your tree has opaque set to false

Take a look at this example, the only difference is, it shows JTextArea instead of a JTree:

http://www.javafaq.nu/java-example-code-686.html