File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JScrollPane

 
cardwell cupp
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
cardwell cupp
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That makes sense. thanks.

------------------
Happy Coding,
Gregg Bolinger
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic