aspose file tools
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
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply 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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Can you use two images and fade one into the other?
 
Similar Threads
Container with only one component
Scrollbar for jtable
Texas Hold'em Poker Game
WA #2 ..... word association
shared objects in distributed applications