Hi,
Can someone tell me why that line is giving me an exception when I run my program?
public void actionPerformed(ActionEvent e)
{
String command = (String) ((JButton)e.getSource()).getText();
if(command.equals ("submit"))
{
nameE = nameInput.getText();
locChoices = (JComboBox)(e.getSource());****CLASS CAST EXCEPTION***
locationE = (String)(locChoices.getSelectedItem());
empAgent.processFormInfo(nameE, locationE);
}
else
{
System.out.println("The reset button was pressed");
}
} //end method actionPerformed.