How does GridBagLayout functions such as gridwidth/height and gridx/y work to scale the size of the GUI?
问题 I was recently introduced to GridBagLayout to substitute the vanilla JPanel layout, but I am having trouble working with the functions like gridwidth/height and gridx/y. I am not sure how they work exactly in changing the size of the GUI and the positions of the buttons. Below is a code my professor gave me to use for reference, and I tried fiddling with certain numbers but the results never turned out to be what I expected to happen, and I am not sure why. EDIT 1: To clarify, I am wondering