• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Yes, of course, and I accept that blame. In fact, i covet that blame. As does this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic