private void constructDialog ( ) { if ( getParentWindow ( ) instanceof Frame ) { dialog = new JDialog ( ( Frame ) getParentWindow ( ) , getTitle ( ) , modal ) ; } else { dialog = new JDialog ( ( Dialog ) getParentWindow ( ) , getTitle ( ) , modal ) ; } dialog . getContentPane ( ) . setLayout ( new BorderLayout ( ) ) ; dialog . setDefaultCloseOperation ( WindowConstants . DO_NOTHING_ON_CLOSE ) ; dialog . setResizable ( resizable ) ; initStandardCommands ( ) ; addCancelByEscapeKey ( ) ; }
Construct the visual dialog frame on which the content needs to be added .