Well, this is the code, simplified:

My class Application
*

public* *void* onModuleLoad() {

*final* FramePanel rootPanel = *new* FramePanel(*ROOT_PANEL_ID*);

rootPanel.setLayout(*new* FitLayout());

Panel mainPanel = getMainPanel();

rootPanel.showPanel(mainPanel);

*new* Viewport(rootPanel);

}
So, the mainPanel is my first screen.

I called my second with this following code:


loginService.login(username, password, *new* AsyncCallbackAdapter<Boolean>()
{

*public* *void* onSuccess(Boolean result) {

*if* (result.booleanValue()) {

dialog.hide();

getFrame().showPanel(workspacePanel); // second screen

} *else* {

MessageBox.*alert*(Utils.*getCapConstants*().error(),

Utils.*getCapConstants*().badCredentials());

}

}

});
 My method getFrame().showPanel(panel) only change hide->show or show->hide
and if the panel is not created , this method created a new one.

In the second panel , i click in a button to return to the first page:


*protected* *void* onLogout() {

 getFrame().showPanel(LoginPanel.*ID*);

 }
 So, my method basically get the LoginPanel and set to show, before set to
hide the current panel.

Thats it,

when i login to go to the second screen again , the layout broke!

regards

Eduardo





On Tue, Oct 21, 2008 at 10:30 AM, Ian Bambury <[EMAIL PROTECTED]> wrote:

> It is normal to do something like that, yes. I do it myself and the borders
> are fine.
> Without seeing the code, it is impossible to say what you are doing wrong
> or if there is a better way of doing it or why it happens...
>
> Ian
>
> http://examples.roughian.com
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to