It is not a problem with the code i think but a general problem with the program. It happens whenever i open the widow for code with any of my classes or scenarios. I just wanted to know if it was a known problem or if there was a reason it was happening.
Maybe you should try reinstalling greenfoot.