You should store uitvoerVeld.getText() in a temporary String variable, because once you change uitvoerVeld.setText(invoerVeld.getText()), you lost the text that was in uitvoerVeld.getText().