Enum 1.5 problems

This is really annoying me. I have been away from Java a while using other technologies. So now when I need to use Java again there is a lot of new stuff to play with. Now the problem is, I trying to use enums and it just keeps giving me the same error:

warning: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier

(try -source 1.5 to use 'enum' as a keyword)

enum Action {Start, Stop, Rewind, Forward};

DatabaseManager.java:39: ';' expected

enum Action {Start, Stop, Rewind, Forward};

1 error

1 warning

This is the code:

enum Action {Start, Stop, Rewind, Forward};

The problem is I抦 already using SDK 1.5. The thing is I抦 trying to do all this from netbeans and that might some how effect cause it, but since I抦 new to netbeans it is relay hard for me to tell.

[860 byte] By [JohanHertza] at [2007-10-2 22:43:29]
# 1
I think it's a Netbeans issue; it knows that enum is a keyword in 1.5and it warns against its usage in a 1.4 like SDK. Eclipse warns ina similar way if you set your compliancy to anything less than 1.5but your code still uses 1.5 features.kind
JosAHa at 2007-7-14 5:57:54 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...