Hello again, sorry to bother you.
The plot thickens!
I downloaded the Class1 and Class2 files you adjusted, however I'm still getting the same error message about cannot find symbol.
However, I tried removing the package line and they worked! They are stored in the same directory and, as explained in a previous reply, the classpath automatically looks in the current directory.
So the question is, why isn't the package line working, yet without it, the 2 files recognise each other fine (now that the classpath is correct)?
Sorry again, I hope you can resolve this, you've still done a good job.
Thank you for being so positive!
I already replied to you before, but it looks like there was a problem with the website because you don't seem to have received it.
Put simply, the problem was caused by the classpath - after I first installed java I found when I used Command Prompt and typed javac to compile the program I'd created, it compiled no problem.
But then when I tried to run it by typing "java" followed by the file name, I got an error message saying it could not find the file.
This problem I later discovered was with the classpath in environmental variables - it wasn't telling the computer to look in the current directory. I avoided this problem by typing "java -classpath . " followed by the filename and it worked!
However, I only had this problem on my laptop.
When I tried it on my main PC, both javac and java worked well with no extra instruction.
So tonight I realised when I tried to compile Class1 on my laptop, it was looking for a compiled file called "Class2" but it wasn't looking in the current directory.
So I tried copying both files to my main PC and tried compiling them from there and it worked! With the exception of the other error you mentioned with the actionlistener.
So I think I should ask you to permanently fix this problem - how can I adjust the classpath on my laptop so it runs like my main PC without needing any further instruction?
I hope this isn't too much hassle,
I look forward to hearing from you.