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 ?
:(
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.