// By adding empty string "", setText work properly with int because the int automatically converted to string inputField.setText(intVariable + "");