PDA

View Full Version : [CLOSED] Window displaying in Firefox



marcinKozlowicz
1 Aug 2008, 12:40 AM
Hi,

I was creating dialog window with form panel containg some text fields to input data.
During development I was testing application in Hosted Mode on Windows ( IE browser )
and everything works fine, but when I run it in Web Mode and watch it in Firefox the displayed window was empty!

Code which shows empty window ( my panel wrapped with some other panels )
Works good on IE but displaying empty window on FF.


final Window modalWindow = new Window();
LayoutContainer container = new LayoutContainer(
new BorderLayout());
LayoutContainer cont = new LayoutContainer();
cont.add(new AddUnitForm());
container.add(cont,
new BorderLayoutData(LayoutRegion.WEST, 600));
modalWindow.setModal(true);
modalWindow.setHeight(320);
modalWindow.setWidth(600);
modalWindow.add(container);
modalWindow.show();
But when i changed code to sth like this it works both on IE and FF



final Window modalWindow = new Window();
modalWindow.setModal(true);
modalWindow.setHeight(320);
modalWindow.setWidth(600);
modalWindow.add(new AddUnitForm());
modalWindow.show();
Tested on:
Windows XP SP2
FF 3.0
IE 6.0

Executable sources in attachment.

darrellmeyer
2 Aug 2008, 9:06 AM
You must include a component in the center region when using a border layout. Also, you should use a FitLayout with the window so that container with the border layout is sized.

haplo
19 Aug 2008, 8:45 AM
Thanks Darrel for your advice to use FitLayout with windows.

I had layout problems with a tab panel in a window. The missing FitLayout was the problem.

A comment in the java doc about that would be nice.