aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Image Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Image Question" Watch "Image Question" New topic
Author

Image Question

Kevin Wright
Ranch Hand

Joined: Jul 10, 2001
Posts: 38
Hi -
Is it possible to place one image on top of another? My situation is this: I have a background image that will have one of three different indicators (also static images) rotated depending on data once a week. This is difficult in HTML, I am trying it out in java.
Thanks,
Kevin
Zkr Ryz
Ranch Hand

Joined: Jan 04, 2001
Posts: 187
What are you trying to do ?
Where do you want yo put this image ???
Probably you could do this:
Have as many images as posibly indicators in a single image ( composed of the background and the foregorund image ), and then rotate it once a week but changing the whole image.
Do you know what I mean ?

Originally posted by Kevin Wright:
Hi -
Is it possible to place one image on top of another? My situation is this: I have a background image that will have one of three different indicators (also static images) rotated depending on data once a week. This is difficult in HTML, I am trying it out in java.
Thanks,
Kevin
Kevin Wright
Ranch Hand

Joined: Jul 10, 2001
Posts: 38
Yes, I'm sorry if it didn't seem clear. Imagine this situation:
+---------------------------------+
| X X |
| |
| X |
+---------------------------------+
The X's are sub-images...I need to find a way to super-impose them onto the main image.
Thanks,
Kevin
Kevin Wright
Ranch Hand

Joined: Jul 10, 2001
Posts: 38
Okay, so the ASCII graphics suck....hope the point gets across anyway
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

To do this in HTML you would have to use CSS (Cascading Style Sheets)...

To do this in Java, you'd have to write a program like the one below...



And launch it in a HTML page like this...


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Image Question