Search code examples
javajava-medialoglwuit

Lwuit non static dialog having issue?


When I use

Dialog form = new Dialog("Login");
Label userL = new Label("Username");
Label passL = new Label("Password");
TextField user = new TextField();
TextField pass  = new TextField();
 Container c = new Container();
c.addComponent (userL);
c.addComponent (user);
c.addComponent (passL);
c.addComponent (pass);

form.addComponent (c);

form.showDialog();

The container is coming in dialog but not inside dialog body....

Can anyone help me????


Solution

  • Your question is unclear do you mean the DialogBody style doesn't apply?

    The DialogBody style is only applied manually in the static dialog methods. You should use c.setUIID("DialogBody");

    Alternatively you might be referring to a change that was done in the current SVN to the way dialogs behave which changed the way dialog styles act. You can learn more about that change in this post: http://lwuit.blogspot.com/2010/10/tips-about-compatibility-issues-with-my.html