Question

I'm developing a LWUIT based application and I have separated my application into one form which has to access components such as the given example log-in dialog.

Problem is I can't seem to find a way to access (or initialize) a container or dialog defined outside the currently displayed form because code like:

findLoginDialog(Display.getInstance().getCurrent()).show();

does not work. I also tried looking at inherited methods but saw that showContainer(...) also requires a source component.

Is it possible at all to do this or any work around?

Était-ce utile?

La solution

What you need is to create a new instace of a Component. The method findSomething is used for the Components which you have created in the Resource Editor. If you want to create a new Object which is not in the Resource Editor´s interfaces, you must use the

createContainer(Resources res, "Name in the Resource editor of this Component")
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top