passing value from jcombobox to other classes?
I have an Jcombobox with an actionlistener set up in a class called "boxSelected", so that when the user clicks on the choice they're after the result is sent to a jtext area.
public class box2listener implements ActionListener {
public void actionPerformed(ActionEvent e) {
if(e.getSource()==queryBox2){
int selectedIndex = queryBox2.getSelectedIndex();
String box2Selected = queryBox2.getSelectedItem().toString();
System.out.println("Selected: "+box2Selected);
String newline = "\n";
textArea3.append(box2Selected + newline);
}
}
};
The class with the actionlistener, box2listener, is actually nested within another class, one called Editor.
My question is, can I pass this new string value, boxSelected, for use in another class? I'm trying to create a new .java file and pass this string value for use with a class there, so I can parse it into some queries.
I've been at this a wee while and am still very new. Thanks for any help or code you could give me here to sort this or set me on my way, any help would be really appreciated.

