A couple of things... First, when adding your components to your main window you need to also add the GridBagConstraints object as a second argument. So instead of ...getContentPane().add(btn) you would have ...getContentPane().add(btn, gbc) where gbc is your GridBagConstraints object. Second, it looks like your gridy argument for the last component is wrong. Instead of 3 it should be 2.
posted 14 years ago
Thank you. Thank you. Thank you. It works. I could stop pulling my eyes out, punching my monitor and cursing.