views:

37

answers:

1

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 ?

:(

+2  A: 

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.

paxdiablo