Because I had to rush the project for a deadline, I rewrote it with if
then else statement.
I might have misread the error message line number and it might very
well be the case statements that is throwing the error.
In my original code the case statements did not use a constant by
itself. However, it was using a public static final constant integer.
case ToolBar.OPENFILE:
case ToolBar.SAVEFILE:
public class ToolBar{
public static final int OPENFILE=0;
public static final int SAVEFILE=1;
}
Looks like the above is not legal even though the variable is final?