Java SWT - dissolve (fade) from one image to the next.

Posted by carillonator on Stack Overflow See other posts from Stack Overflow or by carillonator
Published on 2010-04-24T21:52:13Z Indexed on 2010/04/24 21:53 UTC
Read the original article Hit count: 151

Filed under:
|
|
|

I'm pretty new to Java and SWT, hoping to have one image dissolve into the next. I have one image now in a Label (relevant code):

Device dev = shell.getDisplay();
try {
    Image photo = new Image(dev, "photo.jpg");
} catch(Exception e) { }

Label label = new Label(shell, SWT.IMAGE_JPEG);
label.setImage(photo);

Now I'd like photo to fade into a different image at a speed that I specify. Is this possible as set up here, or do I need to delve more into the org.eclipse.swt.graphics api?

Also, this will be a slide show that may contain hundreds of photos, only ever moving forward (never back to a previous image)---considering this, is there something I explicitly need to do in order to remove the old images from memory?

Thanks!!

© Stack Overflow or respective owner

Related posts about java

Related posts about swt