File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes can i import a partial transparent image? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "can i import a partial transparent image?" Watch "can i import a partial transparent image?" New topic

can i import a partial transparent image?

Shay Gaghe
Ranch Hand

Joined: Sep 03, 2001
Posts: 102
I developing a GUI that contains several images. I need the images to be in oval shape(since they are overlapping each other).
I want to import into my application an image but only rectangle shape is available , is this possible to do parts of an image transparent (then I can to do the image oval and not rectangle)?
Shay Gaghe

[This message has been edited by Shay Gaghe (edited October 14, 2001).]
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

If you are using an image type that supports transparency ( like transparent GIFs ), then Java will recognize the transparency...

This should solve your problem... if not, I have some code to programmatically make an image transparent, but it's much easier to just use transparent GIFs...


Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: can i import a partial transparent image?