private void createPageControls ( ) { WizardPage [ ] pages = wizard . getPages ( ) ; for ( int i = 0 ; i < pages . length ; i ++ ) { JComponent c = pages [ i ] . getControl ( ) ; GuiStandardUtils . attachDialogBorder ( c ) ; Dimension size = c . getPreferredSize ( ) ; if ( size . width > largestPageWidth ) { largestPageWidth = size . width ; } if ( size . height > largestPageHeight ) { largestPageHeight = size . height ; } } }
Allow the wizard s pages to pre - create their page controls . This allows the wizard dialog to open to the correct size .