@Override public void actionPerformed(ActionEvent e){
  historyAdd(getText());
  historyPosition=history.size();
  setText("");
  historyTextEdited=false;
}

@ Override public void actionPerformed ( ActionEvent e ) { historyAdd ( getText ( ) ) ; historyPosition = history . size ( ) ; setText ( "" ) ; historyTextEdited = false ; }
adds sent text to the history , sets history position and clears the input field .
