how to generate a new word?
I have the following problem: the second time i click the submit button the first word will repeat? i want that after the condition meet at the second click the new word will appear. how can i do that?

    if(e.getActionCommand().equals("Submit")){
    	int s = 10;
    	WordGenerator wg = new WordGenerator();
    	String generate = wg.generator();
    
    	if (txtGuessPad.getText().equalsIgnoreCase(this.answer)){
    		if (Score.getText().equals("0")){
    			int intscor = Integer.parseInt(Score.getText());
    			intscor += s;
    			String score = Integer.toString(intscor);
    			Score.setText(score);
    			txtGuessPad.setText("");
    			txtWord.setText(getRandomWord(wg.generator()));
    			}
    	}else if(txtGuessPad.getText().equalsIgnoreCase(wg.generator())){
    		if (Score.getText().equals("10")){
    			int intscor = Integer.parseInt(Score.getText());
    			intscor += s;
    			String score = Integer.toString(intscor);
    			Score.setText(score);
    			txtGuessPad.setText("");
    			txtWord.setText(getRandomWord(wg.generator()));}
    			}
    
    		}
how to generate a new word?
===

I have the following problem: the second time i click the submit button the first word will repeat? i want that after the condition meet at the second click the new word will appear. how can i do that?

    if(e.getActionCommand().equals("Submit")){
    	int s = 10;
    	WordGenerator wg = new WordGenerator();
    	String generate = wg.generator();
    
    	if (txtGuessPad.getText().equalsIgnoreCase(this.answer)){
    		if (Score.getText().equals("0")){
    			int intscor = Integer.parseInt(Score.getText());
    			intscor += s;
    			String score = Integer.toString(intscor);
    			Score.setText(score);
    			txtGuessPad.setText("");
    			txtWord.setText(getRandomWord(wg.generator()));
    			}
    	}else if(txtGuessPad.getText().equalsIgnoreCase(wg.generator())){
    		if (Score.getText().equals("10")){
    			int intscor = Integer.parseInt(Score.getText());
    			intscor += s;
    			String score = Integer.toString(intscor);
    			Score.setText(score);
    			txtGuessPad.setText("");
    			txtWord.setText(getRandomWord(wg.generator()));}
    			}
    
    		}