Why is startLoc/endLoc a two dimensional array? It looks like it just needs to be a regular array of Strings. Also, we want to populate our JComboBox with an array, not a single string. As such, we pass the entire array not just the first element.
final String[] startLoc = {"Lumbridge", "Varrock", "Falador", "Al Kharid", "Draynor Village"};
JComboBox<String> sLBox = new JComboBox<>(startLoc);
final String[] endLoc = {"Lumbridge", "Varrock", "Falador", "Al Kharid", "Draynor Village"};
JComboBox<String> eLBox = new JComboBox<>(endLoc);
We should not reassign startLoc's value, make a new variable and assign it to the select value!
String startingLocation = sLBox.getSelectedItem().toString();
String endingLocation = eLBox.getSelectedItem().toString();
Now we have the String representation of both the ending and starting locations.
if (startingLocation.equals("Varrock") && endingLocation.equals("Lumbridge")) {
// do stuff!
}
I would suggest reading up a bit more about how all these components (arrays/Strings/2D arrays/combo boxes) work to get a better understanding of the Java language, but I hope what I provided helps you with your script.