I have a simple GWT app that takes source code in a TextArea, sends it to a remote compiler, and displays the assembly language output and compiler errors in some other TextAreas. The code below works fine in Safari and Chrome, but the TextAreas and Buttons aren't resized to fill the panels in Firefox. I can manually set the sizes of the widgets to 100% and it's almost acceptable, but surely I'm missing some important bit of CSS knowledge. I am setting the document type to the strict HTML4 DTD ("http://www.w3.org/TR/html4/strict.dtd"). The app is running at http://ferret.granberrys.us:8080/Compiler.html.
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);
According to the documentation you should use
<!DOCTYPE html>
, but Iḿ not sure if that is the problem here. It also could be the TextArea is a span element, or at least not a css block element. You can do this by addingdisplay:block
to the specific widgets.