Hello, I'm doing this:
private Vector menuOptions;
void addOption(String imagefilename) {
try {
Image i = Image.createImage(imagefilename);
menuOptions.addElement((Object)i);
} catch (Exception e) {
e.printStackTrace();
}
}
And I'm getting: java.lang.NullPointerException at GraphicMenu.addOption(GraphicMenu.java:31) //addElement line
Can I add a Inmutable images to a Vector Object?