permaculture playing cards
The moose likes Swing / AWT / SWT and the fly likes special effects for cardlayout of pictures? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "special effects for cardlayout of pictures?" Watch "special effects for cardlayout of pictures?" New topic

special effects for cardlayout of pictures?

Ana Suvari
Ranch Hand

Joined: Aug 18, 2009
Posts: 43
Hi all,

I'm new to this forum and Java. Sorry i forgot to say on my first post. But i am also wondering why they use my real name and not login id?

Anyhow, I have a cardlayout of pictures in Java and i am wondering if i could code some way for each slide to move in slowly from left to right, top to bottom, or have each slide fade in/out or have each text word to appear one at a time. All i am describing is capable in MS Powerpoint. I am wondering if i can do the same in Java? I know sure what possible. If it's possible because you tried it, can you offer some tips on what i should be reading?

I know i would need timers but that's about it. I am not sure if i can manipulate the slides like this.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
the left to right and top to bottom could be done via drawing the images in a component's paintComponent(),
specifying the x,y as negative values initially then adding a bit each time to x,y (in a timer) and calling repaint().

don't know that you'd need a cardLayout for this, perhaps just a JPanel or JLabel
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

But i am also wondering why they use my real name and not login id?

Welcome to our friendly forum ! Names are used as display names. You can read about this policy here, and here.

[My Blog]
All roads lead to JavaRanch
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 1141

A card layout was made to display one component at a time,
it was not made from the point of view of animations.

If you do want such a feature, you would have to do it yourself, and yes, using the CardLayout itself in this situation is a bad idea unless you want
to delegate the animation to a proxy object and use the CardLayout at the end of each transition.

I agree. Here's the better link:

Rob Spoor

Joined: Oct 27, 2005
Posts: 20279

Perhaps JGoodies Animation can help you out.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: special effects for cardlayout of pictures?
It's not a secret anymore!