I am having trouble applying the GridBagLayout on my code. I have two version of the code, one is working and the other is not.
This one is not working: