Hai ragione scusami.. basta sostituire args[0] con textfield1.getText().trim() se è nel textfield1 che va scritto il nome del file