Is it possible to make Java program that will determine the absolute position (x,y on screen) of blinking keyboard cursor? That cursor can be in any text editor.
Not easily, since the position of a cursor on a screen of a program is merely a data point inside that program and rendering that cursor is a method running in the program. (I'm reading your question to mean that the program/editor in question is a wholly separate process from your Java program, right?)
You can theoretically do it if:
The program explicitly exports via some API calls the cursor location
You capture the actual screengrabs of that program very fast, analyze the image difference, and deduce cursor location from appearing/disappearing rectangle or short line in case the screen of the program didn't change save for cursor blink.
- If you need relative (e.g. in # of chars instead of # of pixels) location in an editor, then somehow use edge recognition to detect editor size, some advanced image processing magic to deduce font size, and compute character-based offsets.
If the editor is using standard OS (e.g. Windows) APIs to draw both editing window AND the cursor, it might theoretically be plausible to hook into the system to intercept those calls - i don't posess nearly the amount of knowledge of what those APIs might be or if such even exist, how possible it is to intercept them, and whether Java programs are able to do that even if it's possible theoretically.
The question here is not whatever is possible or not, the question is for what purpose should i want to do this? Frankly, i don't see any reason, and i am sick of annoying mini-apps who act like spyware. Are u trying to duplicate the existent app into another form of mass terror? I beg your pardon if u find my comment offensive, but this is my answer. Another question : why?