我正在使用DocLayout Panel编写应用程序。问题是我可以在GWT设计器中看到结果,但是当我尝试运行应用程序时,没有出现相同的输出。任何人都可以告诉我为什么会这样。
我的代码如下:
package com.ibm.projects.quest.qwt.gui;
import com.google.gwt.core.client.GWT;
public class ApplicationDefaultWindow extends DockLayoutPanel {
private FooterPanel footerPanel = null;
private HeaderPanel headerPanel = null;
private LeftNavigation leftNavigation = null;
private RightNavigation rightNavigation = null;
private ContentPanel centerPanel = null;
public FooterPanel getFooterPanel() {
return footerPanel;
}
public void setFooterPanel(FooterPanel footerPanel) {
this.footerPanel = footerPanel;
}
public HeaderPanel getHeaderPanel() {
return headerPanel;
}
public void setHeaderPanel(HeaderPanel headerPanel) {
this.headerPanel = headerPanel;
}
public LeftNavigation getLeftNavigation() {
return leftNavigation;
}
public void setLeftNavigation(LeftNavigation leftNavigation) {
this.leftNavigation = leftNavigation;
}
public RightNavigation getRightNavigation() {
return rightNavigation;
}
public void setRightNavigation(RightNavigation rightNavigation) {
this.rightNavigation = rightNavigation;
}
public ContentPanel getCenterPanel() {
return centerPanel;
}
public void setCenterPanel(ContentPanel centerPanel) {
this.centerPanel = centerPanel;
}
public ApplicationDefaultWindow() {
// TODO Auto-generated constructor stub
super(Unit.EM);
headerPanel= new HeaderPanel();
this.addNorth(headerPanel, 7.1);
leftNavigation = new LeftNavigation();
this.addWest(leftNavigation,12.0);
rightNavigation = new RightNavigation();
this.addEast(rightNavigation, 9.0);
footerPanel = new FooterPanel();
this.addSouth(footerPanel, 3.5);
centerPanel = new ContentPanel();
this.add(centerPanel);
}
}
答案 0 :(得分:0)
非常感谢莱利为你提示。
现在我改变了
RootPanel.get().add() --> RootLayoutPanel.get().add()
问题解决了。