I'm writing a GUI application. The user selects item from a comboBox (non editable). The suitable input data control is then enabled and user enters data. Then the appropriate object according to the comboBox selected item is created.
- I've thought of using String array to display the list of choices and then using conditional statements to create the object.
- Or create all the objects before user selects and set each object's properties accordingly after user data input.
I can't think of any better way to do this so I'd like to ask if there is one. If no, the first or the second way listed above is better? Thank you.