I had this problem one time... I some how made a copy of the source file and put it some place other than the project folder, but managed to get the project to reference the copy and not the file in the project folder. It was a head banging experience to say the least.
You can see if you are referencing the correct file by removing the source file from your project and seeing if your project still compiles... if it does, then find the source it's really using.
Had a friend do almost the same thing... but with the .class files, he had a reference to objects from .class files and thought he included the source--he did not, so when he included the source in the project and deleted the old class files everything started working.
The problem was exactly as J2EE described. I was compiling only my main program which was compiling some but not all the classes. So I had my main program that used the AFrame class and the AFrame class that used the APanel class. I guess recompiling my main program only recompiled my AFrame class when I made structural changes to it which in turn recompiles my APanel class?
I've only written a few programs in Java and I guess I never run into this situation before which I why I always thought that recompiling one program would recompile all the necessary classes as well.
Anyway thank you for the help and sorry for being a newb at java. =]