i am programming a game, and i wanted to make an LoggIn window where you can put in email username password etc. in. The Problem is that a JTextField doesnt work, so i need to programm the textfield for myself. Everyone works at all but it is just taking the Uppcase of the letters A, Z, S a.e. But i want to have lower and upper case letters. Also if you press Backslash, it writes Backslash in the String. Would be cool if you can help me Sry for my bad English at all im from Germany ^^
Here is where the KeyListener for the Textfield is in. The rest of the Class is just Graphic things, but if you need it too :
That is the full code of this class. I am using a GameStateManager so this is just the GameState for managing the screen which is shown when you start the game.
Thanks for your help ^^
I know it is a repost but i couldnt edit my latest topic :/
What are you trying to do with the textfield that is not possible already?
posted 1 year ago
Al Hobbs wrote:What are you trying to do with the textfield that is not possible already?
The problem is, i cant place an textfield... in my main is the JFrame
But if i try to add an JTextField in the LoggingInState. It is not possible because i already set the JFrame on Visible in the Main. I also tried to move the setVisible into the LoggingInState (I called the startState). But when i add an JTextField, the TextField starts to flicker over the background image.