• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Swing : how to make transparent

 
J. Insi
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wonder if there's a specific answer towards this question.
Since already almost 2 years I spent GUI programming in java.
I haven't notice about making the JFrame transparent as Adobe Air could.

Would anyone here know the answer? or at least could share a thought,
Since Oracle documentation suggest us to use JavaFX instead of Swing for achieving this purpose.

Uncle google seems giving me the same answers as oracle does.

I need a bit of advice. (^ ^'a.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49808
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our GUIs forum, where we usually discuss Swing matters.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49808
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't find anything useful on the JFrame documentation with ctrl-f-opaque and ctrl-f-transparent.
 
Stephan van Hulst
Bartender
Pie
Posts: 6126
74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think this is possible as of yet. In Java 7 Swing provides transparency, I believe, but in Java 6 it does not.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since JDK 6u10, there's a hack that uses a Sun internal class com.sun.awt.AWTUtilities that will in all probability cease to exist in a future Java release that provides this feature as part of the public API.
http://java.sun.com/developer/technicalArticles/GUI/translucent_shaped_windows/
 
J. Insi
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephan van Hulst wrote:I don't think this is possible as of yet. In Java 7 Swing provides transparency, I believe, but in Java 6 it does not.


what?? I should wait until July 28, 2011? Oh my goD!

I finally shocked, once read this


ahaha.... it's just a temporary cry...!!
hehehe

These example works for me...! tada....!

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic