gpt4 book ai didi

java - GWT 错误 - 无法使用 DocLayoutPanel 在浏览器中查看输出

转载 作者:行者123 更新时间:2023-11-29 09:18:13 24 4
gpt4 key购买 nike

我正在使用 DocLayout 面板编写应用程序。问题是我可以在 GWT 设计器中看到结果,但是当我尝试运行应用程序时没有出现相同的输出。谁能告诉我为什么会这样。 enter image description here

我的代码如下:

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);
}
}

最佳答案

非常感谢 Riley 的提示。

现在我变了

RootPanel.get().add() --> RootLayoutPanel.get().add() 

问题解决了。

关于java - GWT 错误 - 无法使用 DocLayoutPanel 在浏览器中查看输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8103254/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com