I use a VerticalPanel as a container and add to it an Image and a Label widgets. The image widget has been set to use the 100% of the width and 80% of the height of the container. The Label widget has been set to use the 100% of the width and 20% of the height of the container.
Unfortunately, when i load two pictures (of different sizes) in two such containers that have their size fixed (width=120px height=100px - the containers a.k.a VerticalPanel), the images do not appear to have the same size on screen.
Why images appear to have different size when they are displayed on web browser?
Try using setPixelSize()
to resize the image as described here: Scaling an Image in GWT