I'm trying to write code which accepts a choice from a combo box, but no
action is done until a button is pressed. The code that I have tried is
below, it executes, but no action happens when I press the button.
String choice = (String)((JComb oBox)source).ge tSelectedItem() ;
if(choice=="Nam e of item")
{
//execute code
}
I have a feeling that it is because I am using
source twice, but again, I am not aware of any methods that I can use.
Thanks.
action is done until a button is pressed. The code that I have tried is
below, it executes, but no action happens when I press the button.
String choice = (String)((JComb oBox)source).ge tSelectedItem() ;
if(choice=="Nam e of item")
{
//execute code
}
I have a feeling that it is because I am using
source twice, but again, I am not aware of any methods that I can use.
Thanks.