hi i am trying to make a hangman game and what ineed to do is when there is wrong answer to put pic of part of the hangman but dont no how to do it, here is my code
thanks
int charPos = +1;
String letter = ALetter.getText();
charPos = FindWord.indexOf(letter);
MyMessage.setText("Position is " + charPos);
if (charPos == 0)Char0.setText(letter);
if (charPos == 1)Char1.setText(letter);
if (charPos == 2)Char2.setText(letter);
if (charPos == 3)Char3.setText(letter);
if (charPos == 4)Char4.setText(letter);
if (charPos == 5)Char5.setText(letter);
}
public static void main(String args[]) {
public void run() {
new HangMan().setVisible(true);
}
});
}