Animating within a Glass Pane

88 views
Skip to first unread message

megaBoltzz

unread,
Nov 1, 2013, 3:33:11 PM11/1/13
to codenameone...@googlegroups.com
Hi

I want to flash a few words one after the another when a particular event happens.I though of using a glass pane on top of the form.I am able to draw a single word.But how do I display multiple words in succession in the same location? Each word will appear for half a second,before being replaced by another.

I tried using Thread.sleep, but it didnt work properly.Is there any better way to do this ?

Shai Almog

unread,
Nov 1, 2013, 4:07:34 PM11/1/13
to codenameone...@googlegroups.com
Hi,
never use Thread.sleep for something like this.

You can use animations etc. but that will be pretty complex.
Instead may I suggest you use the new layered pane which is WAY simpler?

Just set the layout of the layered pane (parentForm.getLayeredPane()) to something like flow layout center and add a label to it.
Then use standard Codename One animations like animateLayout(), replace etc. to animate labels back and forth.
Reply all
Reply to author
Forward
0 new messages