I am attempting to create a simple java form using Swing. The idea basic idea is that the user will select 0 through 5 in a JComboBox. Then, via an ItemStateChanged listener, several panels will be dynamically added, each congaing 4 controls themselves. So if the user selects the number three, three panels are added each containing a textbox and a combo box. I would then like to send this information to a database. I don’t want to have a bunch of nulls in my database caused by a one size fits all form. So if the user selects 3, 3new rows will be added to the database. Any help or insight would be appreciated.
Thank You for your time.
I think that you have look at CardLayout, tutorial shows example about switching betweens the JPanels from JComboBox’es events