0

次のコードで GWT-Popup-Panel を使用しています。

プライベート静的クラス MyPopup は PopupPanel を拡張します {

        public MyPopup() {
          // PopupPanel's constructor takes 'auto-hide' as its boolean parameter.
          // If this is set, the panel closes itself automatically when the user
          // clicks outside of it.
          super(true);

          // PopupPanel is a SimplePanel, so you have to set it's widget property to
          // whatever you want its contents to be.
          setWidget(new Label("Click outside of this popup to close it"));

        }
      }



public void onModuleLoad() {

     final Button b1 = new Button("About");
        b1.addClickHandler(new ClickHandler() {
          public void onClick(ClickEvent event) {
            final MyPopup g = new MyPopup();
            g.setWidget(RootPanel.get("rightagekeyPanel"));
            g.setPopupPositionAndShow(new PopupPanel.PositionCallback() {
                public void setPosition(int offsetWidth, int offsetHeight) {
                  g.setPopupPosition(b1.getAbsoluteLeft(), b1.getAbsoluteTop());
                  g.setAutoHideEnabled(true);
                }
              });

            g.setVisible(true);
            g.setWidth("500px");
            g.setHeight("500px");

            g.show();

          }
        });

ボタン b1 をクリックすると表示されますが、2 回目にクリックすると表示されません。なにが問題ですか?

4

2 に答える 2