void (ActionEvent e) { if (!myModel.myFullList.contains(getText())) addCurrentTextToHistory(); if (myModel.getSize() < 2) return; myCurrentHistoryIndex--; if (myCurrentHistoryIndex < 0) myCurrentHistoryIndex = myModel.getSize() - 1; setText(myModel.getElementAt(myCurrentHistoryIndex)); }