how to learn size of absolute panel in gwt
I can set width or height of an AbsolutePanel via setWidth() setHeight() methods, but there are no getWidht() or getHeight() methods. How can I get width or height after setting 开发者_运维技巧it?
Thanks in advance
Use getOffsetHeight()
and getOffsetWidth()
. Be aware that these values include any padding or border present on the element.
You can also use Element#getClientWidth()
or Element#getClientHeight()
, which won't include borders.
精彩评论