I am trying to write a code from Hangman program. I am not sure if this idea is correct. I was thinking of having dashes (_ _ _ _ _) in textfield which must dynamically change w
I wouldn't recommend text field with dashes, but you can do it like that. Give it a try, see how it looks and then create something better :-) You can, for example, use panels or labels with images, stylized buttons, or just large labels with a character each. Draw a picture of what you would like your game to look like, and then start coding. It's design before code :-)