Paint on glasspane after calling StateMachineBase.back

7 views
Skip to first unread message

aaro...@gmail.com

unread,
Oct 31, 2014, 12:40:51 AM10/31/14
to codenameone...@googlegroups.com
Hi, i'm needing to paint something in the glasspane after i call the StateMachineBase.back method, but when i do this:

@Override
protected void onBtn_ButtonAction(Component c, ActionEvent event) {
    back(c);
    Display.getInstance().getCurrent().setGlassPane(new Painter() { ... } );

}

It paints but immediately show the new form erasing the just painted "image"... how would be a good practice to paint this image in the next form (the one that appears after the back command is called, not the currently one)?

Thanks in advance

Shai Almog

unread,
Oct 31, 2014, 7:35:54 AM10/31/14
to codenameone...@googlegroups.com, aaro...@gmail.com
Hi,
you will need to use the before show event of the previous form (or the generic on show) to do that. You can set a boolean global flag to indicate that you want the glasspane set.
Reply all
Reply to author
Forward
0 new messages