> Some of the windows don't have their preferred size set - the size depends on 
> their contents.

A component does not require a caller to set a preferred size. All components 
have a default preferred size. setPreferredWidth() and setPreferredHeight() 
allow a caller to override this default size.

> Can I trust getPreferredWidth will always return the width that will be given 
> to the window in such cases?

It has been a while since I looked at that code, but I believe that you can 
reasonably make this assumption.

G

Reply via email to