您好我刚刚开始编程,现在我正在制作一个大学项目,我必须从另一个班级获得gwtcontainer
并让它在弹出窗口中看到,不知道我怎么能打电话它
这是我的代码的一部分:
import com.is.lap.client.gui.Login;
public class StartRU extends TabPanel {
private static class MyPopup extends PopupPanel {
public MyPopup() {
super(true);
// Is here where i have the trouble don't know exactly how to do it
setWidget( (Widget) new Login().getLayoutData());
center();
}
}
public StartRU() {
Button LoginButton =new Button("Login");
LoginButton.setWidth("100px");
LoginButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
// Instantiate the popup and show it.
new MyPopup().show();
}
});
答案 0 :(得分:0)
如果Login
类扩展了Widget,您可以简单地
setWidget(new Login());