0

I am building a Student Management System and I want to build a feature to update the details of a specific Student.I have Multiple Columns to update which I select from a combo box.I want to show different panel for different Updation like a different panel for name,a different panel for Course which should show Up whenever Item in Combo box is selected.But on Netbeans,It is not allowing me that,Rather the frame size increases every time i create a new Panel.Any Suggestions? Help would be greatly Appreciated

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Sumit Dhiman
  • 109
  • 3
  • 8
  • Check out [How to use CardLayout with Netbeans GUI builder](http://stackoverflow.com/a/21898439/2587435), if you're interested in going this route. – Paul Samsotha Aug 06 '14 at 03:25

1 Answers1

2
  1. Don't use Netbeans form editor, seriously, it is going to muck you around if you're not familiar with how to use layout managers or separate your code by responsibility...
  2. Separate your panels into different panels, each panel/class should be responsible for managing it's current context/functionality. Don't be afraid to build multiple classes into a single panel, increasing the complexity as required
  3. Make use of appropriate layout managers, like CardLayout

Take a look at Laying Out Components Within a Container and How to Use CardLayout.

Also consider having a look at How to Use Tabbed Panes which would allow you to separate each view into it's own tab and removes the need for the combo box...

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366