void () { myRecentGenerateOK = contentPane.myChkGenerateOK.isSelected(); myRecentGenerateCancel = contentPane.myChkGenerateCancel.isSelected(); myRecentGenerateMain = contentPane.myChkGenerateMain.isSelected(); final String inputString = contentPane.myTfClassName.getText().trim(); if ( validator.checkInput(inputString) && validator.canClose(inputString) ) { close(OK_EXIT_CODE); } }