So here’s a mystery.
Suppose you create in GWT a vertical panel or a flex table, and you add an image which is less than 15 pixels tall:
VerticalPanel panel; ... panel.add(new Image("images/mydot.png"));
But for whatever reason, the cell displays as 15 pixels tall.
Apparently what happens is that the way the image object is inserted into the
And that blank has vertical height.
If you write the following, you can limit the vertical spacing, allowing for tighter heights:
Image image = new Image("images/mydot.png"); panel.add(image); DOM.setStyleAttribute(image.getParent().getElement(),"fontSize","1px");
In testing this seems to tighten things up quite a bit.
I need to investigate this further. But apparently when DOM objects are being inserted during the construction of GWT objects, unwanted extra junk (in the form of blank text spaces) is being inserted at the same time.
%d bloggers like this: