The moose likes Swing / AWT / SWT / JFace and the fly likes JScrollPane Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "JScrollPane" Watch "JScrollPane" New topic
Author

JScrollPane

cardwell cupp
Ranch Hand

Joined: Aug 16, 2001
Posts: 66
Is there a transparent version of the JScrollPanel?
I have been using components (i.e. JTextArea, JLabel...)
they can be made transparent by using setOpaque(false). It wont working on a JScrollPanel, any suggestions?
Thanks all
Cardwell
cardwell cupp
Ranch Hand

Joined: Aug 16, 2001
Posts: 66
Just for everyone's info...JScrollPane is lightweight and can be set transparent by setOpaque(false), but you must also set the veiw port to opaque! scrollpane.getViewport().setOpaque(false)...
Cardwell
Gregg Bolinger
Sheriff

Joined: Jul 11, 2001
Posts: 15040

I have set other componets to opaque(false) and I never see a change. What do you mean by transparent. Can you see through the JFrame or JButton or whatever? Like I said, I never notice a diffrence in the components.

------------------
Happy Coding,
Gregg Bolinger


My Blog | DZone Articles
cardwell cupp
Ranch Hand

Joined: Aug 16, 2001
Posts: 66
When using most swing components, you can make them transparent in that you can see the component that they are on top of's back ground. For example, I place an image on a Frame, I then place a JScrollPane on top of it, if I set the opaque as false, i then can see the image through it...Does that make since???
Greenest horn
Cardwell
Gregg Bolinger
Sheriff

Joined: Jul 11, 2001
Posts: 15040

That makes sense. thanks.

------------------
Happy Coding,
Gregg Bolinger
 
 
subject: JScrollPane
 
Threads others viewed
can i import a partial transparent image?
Column name not displayed!
2D animation/transparency question
panel
Jpanels and Jscrollpanels
developer file tools