How can I determine the preferred size of a component immediately after creating it?

Scott Stanchfield

Because the preferred size of a component is usually dependent on fonts and decorations used for a specific platform, you need to "realize" the component before you can ask.

To realize a component, call "addNotify()" on it. This creates the necessary peer components for it to properly determine the font sizes and any other platform details it needs.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.