Sorry for the confusion cause,
i did not put the whole code as it's too big.
the end of the goal is that
the text is displayed in pgraphics
so lets say int a = 5;
pgraphics.text("abc",a,a,a,a);
the text is placed at width =5 and height =5 of the pgraphics.
so i want the text in the pgraphics to be highlighted when hover over the problem is
if(mouseX >a && mouseX < a+a && mouseY >a && mouseY <a+a ){
drawingArea.fill(0,135,425);
}
the problem here is the a that i just stated is the position of the actual windows not the pgraphics,
my goal is to stat that a as in the position of pgraphics
thx