deletedelete
Printable View
deletedelete
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
Then why not just get the value of jTypeDDB?Quote:
So i want to search the 'type' the user has selected in the database once they have clicked on the 'searchButton'.
Code :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
Thanks a lot copeg it looks like its working how its suppose to.