getHeight() vs getPreferredHeight() what is the difference
I know, that it is a stuped question. but I can't understand, what is the difference between开发者_开发问答 getHeight() and getPreferredHeight() ?
When I must to use getHeight and when getPreferredHeight ?
:(
Surely getHeight will get the actual current height and getPreferredHeight will get the preferred height, no? :-)
Actually, on further investigation, it appears getPreferredHeight is used by a layout manager so you can tell it what height you want your control to be.
The getHeight call returns the actual height which, presumably, can change if need be.
加载中,请稍侯......
精彩评论