Problem with Graphics

95 views
Skip to first unread message

86.re...@gmail.com

unread,
Sep 10, 2013, 2:23:52 AM9/10/13
to codenameone...@googlegroups.com
Hi all,

I met a problem with graphics. Firstly I draw a roundRect in black color on a glassPane ,and I want to wipe that rect  some seconds later.

How do I wipe? and How do I set the seconds?(I have tried Thread.sleep(xx);It's not working)

Thanks !

 

Shai Almog

unread,
Sep 10, 2013, 5:10:11 AM9/10/13
to codenameone...@googlegroups.com
Hi,
you should probably not do that. If you are asking about thread sleep then you should probably read a bit more about the EDT and how that works.
There is no wipe method, only drawing so you can fill again with the background color to wipe.

If you want to do it this way you need to write an animation where the animate() method effects the state of the animation and the paint method executes that animation. Alternatively you can use: Timelines, layout animations and replace effect all of which are much simpler and can probably accomplish this more efficiently.

fox red

unread,
Sep 10, 2013, 5:30:34 AM9/10/13
to codenameone...@googlegroups.com
Thank you !

在 2013年9月10日星期二UTC+8下午2时23分52秒,fox red写道:
Reply all
Reply to author
Forward
0 new messages