I'm being challenged by SpinnerListModel's setList(List<?> list) method.
Currently I have defined a SpinnerListModel:
This works fine.
private static Vector Hours12Strings = new Vector();
static{
Hours12Strings.add("1");
......... etc..........
}
Later on in "createGUI"
SpinnerListModel hoursModel = new SpinnerListModel(Hours12Strings);
I have also created a static Vector named Hours24Strings and I would like to switch between 12 and 24 hour modes so I do:
And the compiler gives me the following error:if(checkBox1224.isSelected()){
hoursModel.setList((java.util.List)Hours24Strings) ;
}else{
hoursModel.setList((java.util.List)Hours12Strings) ;
}
I'm being "dense" / what am I missing?java:150: cannot find symbol
[javac] symbol : method setList(java.util.Vector)
[javac] location: interface javax.swing.SpinnerModel
[javac] hoursModel.setList(Hours24Strings);
[javac] ^
Thanks in advance.
roy