简体   繁体   中英

PopupPanel Not Showing

It's late, I'm tired and I can't figure out why a simple popup panel instead of showing as it should, displays a label beneath my. For example:

|SOME CLICKABLE BUTTONS| |                         |
|SOME MORE OPTIONS     | |      SOME CONTENT       |
|EVEN MORE OPTIONS     | |                         |
|Please wait|

"Please wait" is the label as you can see is created like so in the:

@Override
public void onModuleLoad()
{     ...<snip> //creates

        final PopupPanel popup = new PopupPanel(false, true);
        popup.add(new Label("Please wait"));
        popup.center();

        RootPanel.get().add(popup);

Some things you should know:

I'm running this in development mode via Jetty. I'm using reflections without class literals to load my panels because I haven't come round to implementing the workaround using generators (and the application is rather large, so it needs splitting). Though I doubt these things are causing it problems.

Shouldn't upon load, a popup display? My overall goal is to have something which displays a loading gif everytime a new part of the application is loading.

Do not add your PopupPanel to a RootPanel.

Delete this line

RootPanel.get().add(popup);

and it will work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM