called when the user clicks ok . concode_field_sep MarkovTextGenerator mtg concode_elem_sep TextArea resultBox concode_elem_sep Stage dialogStage concode_elem_sep TextField numWordsField concode_elem_sep MainApp mainApp concode_field_sep void setMainApp concode_elem_sep void handleCancel concode_elem_sep boolean isInteger concode_elem_sep void setResult concode_elem_sep boolean isInputValid concode_elem_sep void setDialogStage concode_elem_sep void initialize concode_elem_sep void setMTG
void function ( ) { if ( isInputValid ( ) ) { String loc0 = mtg . generateText ( Integer . parseInt ( numWordsField . getText ( ) ) ) ; setResult ( loc0 ) ; } else { mainApp . showInputErrorDialog ( "srini_string" ) ; } }