This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Can you use two images and fade one into the other? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Can you use two images and fade one into the other?" Watch "Can you use two images and fade one into the other?" New topic
Author

Can you use two images and fade one into the other?

Klaas Vredevort
Greenhorn

Joined: Dec 27, 2005
Posts: 29
Hey

Is it possible to use two pictures in java and fade one into another? like the one slowly fading away and the next one fading to the foreground?

Klaas
Matti Poro
Ranch Hand

Joined: Dec 03, 2005
Posts: 41
http://java.sun.com/docs/books/tutorial/2d/index.html

Override JPanel's paintComponent(Graphics g) method:



Then use a thread to increase or decrease the alpha value.
David Irwin
Ranch Hand

Joined: Mar 25, 2004
Posts: 82
Originally posted by Klaas Vredevort:
Hey

Is it possible to use two pictures in java and fade one into another? like the one slowly fading away and the next one fading to the foreground?

Klaas


This may not directly answer your question, but I've used the JGoodies animation library and it's quite cool. You may want to check it out and see if it's applicable to your needs.

Good luck!

Dave
 
GeeCON Prague 2014
 
subject: Can you use two images and fade one into the other?