File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "special effects for cardlayout of pictures?" Watch "special effects for cardlayout of pictures?" New topic
Author

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é
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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: 917

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.

My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

Perhaps JGoodies Animation can help you out.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: special effects for cardlayout of pictures?
 
Similar Threads
CardLayout
CardLayout / JPanel Question
How to get the Java Logo
JScrollPane performance problem
slide show in jsp