0
我有一個簡單的GWT應用程序,它將TextArea中的源代碼發送給遠程編譯器,並在其他TextAreas中顯示彙編語言輸出和編譯器錯誤。下面的代碼在Safari和Chrome中運行良好,但TextAreas和Buttons未調整大小以填充Firefox中的面板。我可以手動將小部件的大小設置爲100%,這幾乎可以接受,但肯定我錯過了一些重要的CSS知識。我將文檔類型設置爲嚴格的HTML4 DTD(「http://www.w3.org/TR/html4/strict.dtd」)。該應用程序正在運行在http://ferret.granberrys.us:8080/Compiler.html。GWT DockLayoutPanel在Firefox中無法正常顯示
RootLayoutPanel rootPanel = RootLayoutPanel.get();
DockLayoutPanel panel = new DockLayoutPanel(Unit.EM);
codeArea = new TextArea();
codeArea.setText("int main() {return 0};");
DockLayoutPanel outputPanel = new DockLayoutPanel(Unit.EM);
ListBox compiler = new ListBox();
compiler.addItem("Clang/LLVM");
outputPanel.addNorth(compiler, 2);
assemblyArea = new TextArea();
assemblyArea.setText("Asm");
Button compileButton = new Button();
compileButton.setText("Compile");
outputPanel.addSouth(compileButton, 2);
outputPanel.add(assemblyArea);
panel.addEast(outputPanel, 20);
compilerOutput = new TextArea();
compilerOutput.setReadOnly(true);
compilerOutput.setText("Compiler");
//panel.addWest(codeArea, 800);
panel.addSouth(compilerOutput, 10);
panel.add(codeArea);
rootPanel.add(panel);
一個簡單的'<!DOCTYPE html>'不會改變任何東西,也不會將'display:block'添加到相關的樣式表條目中。我會繼續環顧四周。 – yrrebnarg 2012-04-23 23:36:15