So im doing this swing java gui project where the admin can login and search, modify and add users to the database mysql.
Im having trouble putting in the right getParameter to get:
type = radio group button of 2 with 1 as Doctor and 1 as Nurse
Specialty = a list of different doctor specialties such as Plastic Surgeon, Pediatrician and etc.
Am I setting the 'get' right? for type(radiogroup) and specialty(drop down list)
Line 4 and 9 respectively are where i get errors.
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
int result = AddDoctorNurseQueries.addPerson(
type.getSelectedItem().toString(),
lname.getText(),
fname.getText(),
username.getText(),
pass.getText(),
specialty.getSelectedItem().toString() );
if ( result == 1 )
JOptionPane.showMessageDialog( this, "Person added!",
"Person added", JOptionPane.PLAIN_MESSAGE );
else
JOptionPane.showMessageDialog( this, "Person not added!",
"Error", JOptionPane.PLAIN_MESSAGE );
}