File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Image Overlapping not proper Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Image Overlapping not proper" Watch "Image Overlapping not proper" New topic
Author

Image Overlapping not proper

Manoj Tyagi
Ranch Hand

Joined: Jun 11, 2002
Posts: 35
Dear All,
I have 3-4 images which are to be overlapped. Infact I have 3-4 JLabels which have these images as their icon set. Now when i overlap them one image rectangular area covers the other images means this does not look transparent. Means if i properly put the one image over other only one is seen.
I have tried with BufferedImage & Alpha-Composite etc but what happen with this if i make it total transparent(0.0) it becomes black (rectangle), if i make it total opaque(1.0) , it covers the other image. If i kept this value in between, some undesired background comes with image.
Please help me out if you have even some idea.
Thanks,
Manoj
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8867
    
    8

Have you tried setOpaque(false) on your JLabels?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
 
Consider Paul's rocket mass heater.
 
subject: Image Overlapping not proper