question: private void boardSaveImage ( ) { if ( curfileImage == null ) { boardSaveAsImage ( ) ; return ; } JDialog waitD = new JDialog ( frame , Messages . getString ( "BoardEditor.waitDialog.title" ) ) ; waitD . add ( new JLabel ( Messages . getString ( "BoardEditor.waitDialog.message" ) ) ) ; waitD . setSize ( 250 , 130 ) ; waitD . setLocation ( ( frame . getSize ( ) . width / 2 ) - ( waitD . getSize ( ) . width / 2 ) , ( frame . getSize ( ) . height / 2 ) - ( waitD . getSize ( ) . height / 2 ) ) ; waitD . setVisible ( true ) ; frame . setCursor ( Cursor . getPredefinedCursor ( Cursor . WAIT_CURSOR ) ) ; waitD . setCursor ( Cursor . getPredefinedCursor ( Cursor . WAIT_CURSOR ) ) ; try { ImageIO . write ( bv . getEntireBoardImage ( ) , "png" , curfileImage ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } waitD . setVisible ( false ) ; frame . setCursor ( Cursor . getDefaultCursor ( ) ) ; }
target:  Saves the board in PNG image format.