A
A
Alexander Interesting2021-10-23 23:10:39
Java
Alexander Interesting, 2021-10-23 23:10:39

How to get cursor position relative to screen in JTextArea?

I downloaded the library for code completion for JTextArea, but the functionality did not meet the desired requirements, and I decided to write my own library, I ran into the fact that I could not get the cursor coordinates (textArea.getCaretPosition()) relative to the entire screen, to set the window position for selection auto-completion, but in that library they somehow did it. How can this be implemented?

Old Library: AutoComplete by Fifesoft

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question