• Post Reply Bookmark Topic Watch Topic
  • New Topic

Transparent JInternalFrame

 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I was wondering if it was possible to have a JInternalFrame with a couple of labels on and other components, so that you can see through it on the place where you don't have any components placed(using Null Layout).

Thanks for any help
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent!

Thanks, so essentially internalFrame.setOpaque(false); does it.
I noticed you set the colour of the InternalFrame to 0,0,0,0 which is black but alpha=0, so its just transparent.

But when I set the colour to 255,0,0,0 its still transparent.
A little confusing.

not sure how the colour works with the opaque property.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!