I have a TextArea in javafx but do I need to get the position x, y or x coordinates, and the TextArea courses as I get them?
I have a TextArea in javafx but do I need to get the position x, y or x coordinates, and the TextArea courses as I get them?
The method to use is getPointerInfo ().
Point punto=MouseInfo.getPointerInfo().getLocation();
int x=punto.x;
int y=punto.y;
With that you get the position of the pointer, to know if it is within the jtextarea you should know the relative position of the jtextarea within the frame or panel that is, and make the necessary calculations based on it.
If you need something more specific, you could give me some code example to collaborate.
Good luck!