0
我嘗試TabPanel和PopUp小部件,但都顯示在瀏覽器中沒有樣式...我從互聯網上下載的其他示例沒有問題。這是怎麼回事?GWT小部件沒有顯示樣式
這就是我看到的一個例子......我錯過了什麼? 感謝
這是我的代碼:
.....
Button search = Button.wrap(DOM.getElementById("search"));
search.setVisible(true);
search.addClickHandler(new ClickHandler(){
public void onClick(ClickEvent event) {
new MyPopup().show();
}
});
}
private static class MyPopup extends 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"));
}
}
謝謝!它解決了我的問題! – 2014-10-07 17:59:52