question: @ Override public void actionPerformed ( ActionEvent e ) { FileDialog chooser = new FileDialog ( frame , "Use a .png or .jpg extension" , FileDialog . SAVE ) ; chooser . setVisible ( true ) ; if ( chooser . getFile ( ) != null ) { save ( chooser . getDirectory ( ) + File . separator + chooser . getFile ( ) ) ; } }
target:  Opens a save dialog box when the user selects "Save As" from the menu.