0
Pls help with my java project using GUI Swing.
Hi, i am relatively new to programming using Swing, in my code the textfield array for the number of players does not appear visible. i can't figure out what is wrong. It is created though as the System prints out the length of the textfield for each one to check. It is not being added to the GridBagLayout. https://code.sololearn.com/cpqSP34IeRdK
3 Respostas
+ 1
Hello Stephen
Line 33:
If you change this:
playerNumberLabel.setVisible (true);
you will see that your Label is there but it ended up somewhere in the middle of nowhere ;)
I suggest you to set the x and y postion.
0
hi playerNumberLabel is made visible when the startButton is click. But the playerName and playerNameLabel does not show.
0
Stephen
And I think that's because they're not positioned correctly.
Once you make them visible, you can check where they are and adjust their position.
If everything is correct, you can make it invisible again.