Dear Professor Hwang,
I found out what was wrong. I was the problem or rather my name. It contains an unusual Danish character (ø) and this means that when I save your applet to a folder in my documents all path-names will contain this unusual character. But the applet cannot handle unusual characters in path names. I moved the applet to the root-directory (C:\) and all problems disappeared. I post the answer because other users may experience similar problems.
Yours sincerely
Bjørn Felsager
Lecturer in physics
Haslev Gymnasium & HF