File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JScrollPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
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
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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


GenRocket - Experts at Building Test Data
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
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

That makes sense. thanks.

------------------
Happy Coding,
Gregg Bolinger
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JScrollPane
 
Similar Threads
2D animation/transparency question
can i import a partial transparent image?
Jpanels and Jscrollpanels
Column name not displayed!
panel