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

2015/1/10

Importing colors into Greenfoot.

sprinty200 sprinty200

2015/1/10

#
My teacher taught us how to import colors into Greenfoot using "import java.awt.Color;" but whenever I try to import it, it says illegal start of expression. Is there something I am doing wrong or am I just missing something.
danpost danpost

2015/1/10

#
It probably has something to deal with where you are inserting the import line into your code. Usually, import lines are at the top of the class with no indentation and outside of any and all brackets. If you cannot resolve the issue, post the code you are trying. Use the 'code' link below the reply box to insert code into your post. Also, ensure the line before where you are placing it is ended properly.
You need to login to post a reply.