I have a textbox, which should dehighlight it's position, when you click not on it. The methods work except of the method to check the clicks:
The problem isn't in the highlight methods. I checked on that. Thanks for help.
/** * The box will be activated, when you click into it. */ private void checkOnActivation(){ if(Greenfoot.mouseClicked(this)){ active = true; highlightPos(); }else if(Greenfoot.mouseClicked(null)){ active = false; deHighlightPos(); } }