le stringhe si confrontano con equals
if (submit.equals("Prev")) {