I am trying to add this list of Strings
private String[] dest = {"New York", "Dahab", "Rome", "Sydney", "Tokyo"};
To this combo box like so
for(int i = 0; i < dest.length; i++){
System.out.println(dest[i]);
destinationField.addItem(dest[i]);
}
However I get a NullPointerException on the destinationField.addItem(dest[i]); line
JComboBox<String> destinationField;