I need help getting information from the mouse like the mouse's X and Y coordinates. I can get the code to compile, but when it runs I get a nullPointerExeption error message. Can anyone help me? Thanks.
MouseInfo mouse = Greenfoot.getMouseInfo();
if (mouse != null)
{
int mouseX = mouse.getX();
int mouseY = mouse.getY();
// etc.
}