This site requires JavaScript, please enable it in your browser!
Greenfoot back
prelaoved
prelaoved wrote ...

2024/3/31

java.lang.RuntimeException

prelaoved prelaoved

2024/3/31

#
how to fix java.lang.RuntimeException in my scenario?
Spock47 Spock47

2024/3/31

#
There are a lot of reasons that can lead to a RuntimeException. To fix it, one can look at the stacktrace (the red error messages) and check the source code (especially at the lines that the stacktrace mentions). If you post the stacktrace and relevant source code parts here, we can try to help you. Live long and prosper, Spock47
prelaoved prelaoved

2024/3/31

#
can you check in my scenario please? I don't know where I went wrong
prelaoved prelaoved

2024/3/31

#
Spock47 wrote...
There are a lot of reasons that can lead to a RuntimeException. To fix it, one can look at the stacktrace (the red error messages) and check the source code (especially at the lines that the stacktrace mentions). If you post the stacktrace and relevant source code parts here, we can try to help you. Live long and prosper, Spock47
can you check in my scenario please? I don't know where I went wrong
Spock47 Spock47

2024/3/31

#
As far as I see, it has only problems when being executed on the website, not in Java. I guess it has to do with the awt.Font and awt.Color that are used in the scenario. As far as I know, for running correctly on the website, it has to use greenfoot.Color and greenfoot.Font instead of the awt font and color. For details see here: https://www.greenfoot.org/doc/font_color Live long and prosper, Spock47
prelaoved prelaoved

2024/4/1

#
Spock47 wrote...
As far as I see, it has only problems when being executed on the website, not in Java. I guess it has to do with the awt.Font and awt.Color that are used in the scenario. As far as I know, for running correctly on the website, it has to use greenfoot.Color and greenfoot.Font instead of the awt font and color. For details see here: https://www.greenfoot.org/doc/font_color Live long and prosper, Spock47
I've followed it but it's still giving me an error, can you help me fix it?
You need to login to post a reply.