0

I have a several buttons running vertically on a panel and then 3 panels to their right. Each will display a picture depending on input from the buttons.

The problem I have is that as an image gets displayed it increases the size of the buttons and I would like them to stay are they are.

How do I prevent the resizing to occur?

mKorbel
  • 109,525
  • 20
  • 134
  • 319
silentbob
  • 59
  • 1
  • 5

1 Answers1

1

Try using GridBagLayout. It gives you a lot of freedom and if you're using Netbeans Form Building tool it's really easy to create good looking GUIs.

kentcdodds
  • 27,113
  • 32
  • 108
  • 187
  • Netbeans will build the code for you. I don't know if that's what you mean, but if that is the case you can write the code yourself... It's really a great solution. I use grid bag for (almost) everything. You get a lot more control. – kentcdodds May 25 '12 at 15:45
  • 2
    I'm not a `GridBagLayout` fan, but the NetBeans designer is a _great_ way to experiment: change something, check the code, change, check, etc. You can always throw away the `.form` and keep the code. – trashgod May 25 '12 at 18:06