• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

transperant frame

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi can any one help me in creation of transperant frame
 
amod gole
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think no one from javaranch is capable to answer me
 
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps if you asked it in the Swing/etc... forum.
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by amod gole:
i think no one from javaranch is capable to answer me



Indeed. 55 minutes elapsed in (what here in the U.S. was) the middle of the night. Surely someone should have answered your question given such a long time!

Your question does belong in the Swing/AWT forum, so I'll move it there. But the answer is, of course, that Java has no API to create transparent windows. This is only an experimental feature in many of the underlying window systems Java has to work with; Java can't add features that the OS doesn't have. The book "Swing Hacks" shows how to fake a transparent or shaped window effect by copying bits from the desktop onto a Java window.

Moving to "Swing/AWT/SWT/JFace".
 
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by amod gole:
i think no one from javaranch is capable to answer me



Nobody can answer you because it's currently impossible with AWT & Swing. The best you can do is a workaround as Ernest alluded to. I'd have taken the time to give an example but I don't feel like wasting the time if you're going to be rude.
 
amod gole
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Ken Blair,
sorry. i am very very sorry. and i will you give assurance that from next time this type of word i never use
 
amod gole
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ken blair,

can you give me some information about Color.Translucent
what the use of this
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Color that is TRANSLUCENT may contain alpha values from 0.0 to 1.0, as opposed to a BITMASK where it's either 0.0 or 1.0 and not anything in between, or OPAQUE which is always 1.0.

That is not directly relevent to your original question though. What you need to understand is that the many if not most operating systems do not support transparent windows themselves and as such it is impossible for Java to provide it. A common workaround is to use a java.awt.Robot to paint what was behind your window on top of your window. That's not a transparent but it can be used to provide the illusion of one.
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rather than reinvent the wheel:

http://www-128.ibm.com/developerworks/java/library/j-iframe/

They have their bugs though. The only 'perfect' ones I've seen were forced to use native APIs and consequently aren't 'really' Swing as they'll break the instant you run it on anything but Windows. I'm not sure what solution is presented in the book Ernest mentioned but I doubt it's without similar bugs or limitations.
 
Hang a left on main. Then read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!