In your second class create a Settings
object
public void actionPerformed(ActionEvent e) {
JComboBox comboBox = (JComboBox)e.getSource();
String selectedRoute = (String)comboBox.getSelectedItem();
RootSelection r1=new RootSelection();
//Settings object
Settings mySettings = new Settings();
mySettings.setRootName(selectedRoute);
}
Then pass this object to your method in your third class
A side note:
you shouldn't make your Settings
class full of static things
E.g. This is better
public class Settings {
private String RootName;
public void setRootName(String rootName){
RootName = rootName;
}
public String getRootName(){
return RootName;
}
}