0

Hello all!

I am trying to create a form like structure using Swing to enter data into MySQL database. I have a combo box that has a list of items to be chosen. If the user does not find the option that he needs, he can choose 'Other' as an option from the combo box. I have given another text field where the user can articulate what his other option is. Now I want to append whatever the user enters in the 'Other' textfield to the combo box list while the user click the save button; thus saving the option in the corresponding table in the database.

Can anyone guide me as to how I can achieve this?

Thanks in advance.

Thankfully,
Nadhi.

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by nadhi
0

Your question is too broad. Which part of the desired operation do you not understand? Do you know how to save data to a database? Do you know how to retrieve values from a UI component? You need to narrow your question a bit, unless you expect someone to write a demo of this entire operation for you, which I would assume is highly unlikely to be done.

0

Your question is too broad. Which part of the desired operation do you not understand? Do you know how to save data to a database? Do you know how to retrieve values from a UI component? You need to narrow your question a bit, unless you expect someone to write a demo of this entire operation for you, which I would assume is highly unlikely to be done.

Thanks Ezzaral for your reply.
I tried to rephrase my query. It actually clarified the logic behind what I am wanting to do. I am held up with the syntax of implementing it. I will try it. If the code doesn't work, I will get back.

Thank a lot again. I needed a bit of thinking. I did. Thank you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.