deletedelete
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
deletedelete
Last edited by kpat; March 29th, 2012 at 04:49 AM.
I don't understand why do you need to nest an ActionEvent? When the user hits the Submit JButton, the ActionListener code just needs to retrieve the selected value from the JComboBox
(...and please read the nomenclature I use closely - we are programmers and our brains often work like compilers - meaning things like "combo box" and actionEvent quite often lead to confusion, resulting in a 'cannot find symbol' error)
deletedelete
Last edited by kpat; March 29th, 2012 at 04:50 AM.
Then why not just get the value of jTypeDDB?So i want to search the 'type' the user has selected in the database once they have clicked on the 'searchButton'.
if (e.getSource() == searchButton) { String type = jTypeDDB.getSelectedItem().toString(); }
...and please read the note in post #2. Combo Box != JComboBox. Like I said, using shorthand for class names can lead to confusion. So why even leave the possibility of confusion?
deletedelete
Last edited by kpat; March 29th, 2012 at 04:50 AM.
Thanks a lot copeg it looks like its working how its suppose to.