Combobox selections in to a database
I'm writing a simplish program which requires me to select items from a set of combo boxes and save each of the selected items to their corresponding columns in a mysql database.
So far I've only been using the bindings systems to populate the combo boxes and while auto-generated code is handy, it's kinda obscure to reverse engineer, at least for my brain.
I've been trying to look for similar examples of this, but truth be told, the similar cases have been too complex for me to pick the parts I need.
Say I have 8 combo boxes with items selected, one button to write the selections to the database, and a database with 9 fields (one being the id primary) leaving the other 8 for the selections.
If anyone would be so kind as to show me a dumbed down version of establishing a database connection through a button click, then getting the highlighted item out of each combo box and then inserting in to the correct table, it would be very much appreciated.
(and if you happen to play eve-online, ask me for a billion isk as a reward ;) )
Re: Combobox selections in to a database
Have you done any JDBC?
Have you got a method that will take 8 parameters and INSERT them into the relevant table in your database?
Do you know how to write an actionListsner for a JButton?
Have you got that code?
Does it read the selected values from the combo boxes?
Join para 1 to para 2...