JPanel with GridBagLayout resizing problem
I created a JFrame that uses a GridBagLayout, with three JPanels inside. In one panel, which happens to be the largest, is a GridLayout of JButtons, in a 6x6 formation. The text for each of the JButtons changes periodically, and sometimes when it does change, there is a small change in the size of the whole Panel. My problem is that I can't find a way to keep the size of this JPanel from changing. I'm guessing it has something to do with the GridLayout wanting to keep all of the JButtons the same size, but when one of them changes (due to the change in its text), it forces them all to change so that they are equal in size. I tried looking for a way to prevent the size of the JButtons from changing, but I couldn't find anything. I also tried calling getBounds() every time the keyListener was active, before any change in text had occurred in the JButton, then I setBounds() to the bounds that I obtained before I changed the text... this didn't work.
ANY suggestions?? Thanks!