Hi everyone, Im new to site and new to Java - have an assignment in Hangman - to date I have created the Hangman class and coded the tester so its working with 1 word! I have also coded the hangman component which is currently static and displayed on opening the component viewer. My problem is how do I join up the class and the component to run the GUI game.
e.g. code to replace the secretWord with dashes is
//change string to char and fill with dashes
public void setDashWord()
{
dashWord = new char[secretWord.length()];
for (int i=0; i< secretWord.length(); i++)
{
dashWord[i]='-';
}
}
how do i link this to the text field so it prints out the dashes. I am confusing myself reading text books and no further forward. Thanks for any help