• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to implement Java Animation Fading In & Out?

 
J. Insi
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello guys...!

Seems that I'm still confused for doing the animation of fading out and fading in...
Couple weeks ago, I found the pushing pixel with its trident library... and the (old articles) seems nice,
but it didn't show us the fading tutorials... tough.

And yet, the owner seems now busy with android rather than the swing now...
Located at GItHub: Link.
I just realized it today. OMG.

Anyway, is there any way arround to do some animation tricks
fading in and out in Swing app?

Search result didn't give me constructive answers, yet.


 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Animation in Swing is done using a javax.swing.Timer. You could take a look at JavaFX 2.0 which has an Animation API.
 
J. Insi
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote:Animation in Swing is done using a javax.swing.Timer. You could take a look at JavaFX 2.0 which has an Animation API.


thanks for replying, Darryl.
Fading JLabel using swing.Timer? Is that real?
I thought that javax.swing.Timer is used for making the Swing safe-without breaking the rule of EDT.

i mean, there's no method of fading over there.... isn't?

JavaFX, ya... that's right.
Do you have a suggestion which book that i should read upon?
 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fading JLabel using swing.Timer? Is that real?


JavaFX 1.x is on its way out; 2.0 is still in beta. If you decide to learn FX, I would recommend going for 2.0 which uses Java syntax (no scripting language to learn). There are a few largely incomplete/overly simple online tutorials. Search the net.

Here's the FX 2.0 start page: http://download.oracle.com/javafx/
 
J. Insi
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hehehe.... thanks, Darryl.

that's the trick for changing its foreground (become transparent).

JavaFX 1.x is on its way out; 2.0 is still in beta. If you decide to learn FX, I would recommend going for 2.0 which uses Java syntax (no scripting language to learn). There are a few largely incomplete/overly simple online tutorials. Search the net.

Here's the FX 2.0 start page: http://download.oracle.com/javafx/


anyway, i think that's the topic covered already inside this book, isn't?
Book Title: JavaFX™: A Beginner’s Guide
Author: J. F. DiMarzio

ya, that's great... how about another book? (as I'm updating resources to be read upon).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic