I have the following. If I move the mouse over the bs object the text does appear. But how do I remove the text object when the mouse pointer leaves the bs object.
HotSpot bs; Text txt; public void act(){ if(Greenfoot.mouseMoved(bs)){ txt = new Text(bs.getDescription(),20,new Color(0,0,0),null); txt.setImage(txt.getText()); addObject(txt,this.getWidth()/2,20); }else{ this.removeObject(txt); }//end if else }//end act