Apps Times two values and display result


im just getting use to java and android, I'm building an app which allows the user to enter two values then * them both and displays the result.

below is the onCreate method which inside I register a click event where the time multiply is taking place.

TextView DisplayText;
EditText EnteredText, EnteredTimesText;
int r, eText, eTimesText;

protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub

DisplayText = (TextView) findViewById(;

EnteredText = (EditText) findViewById(;
EnteredTimesText = (EditText) findViewById(;

Button btnGen = (Button) findViewById(;
btnGen.setOnClickListener(new View.OnClickListener() {

public void onClick(View v) {
// TODO Auto-generated method stub


eText = Integer.parseInt(EnteredText.getText().toString());
eTimesText = Integer.parseInt(EnteredTimesText.getText().toString());

r = eText * eTimesText;




but it keeps erroring can anyone see what im doing wrong here? please bare in mind I've only been doing android for a two days.

thank you for your time