enter image description here

There is a program, where 1 is JPanel, 2 is JTextPane. It is necessary to implement the selection of the line in which the caret is currently installed. Help me find an example of implementation, well, or push where to think, please)

  • Pay attention to stackoverflow.com/questions/5405550/… . Maybe you meant exactly that - Chubatiy
  • Indeed, the link is the answer. Pretty obvious by the way, and pushed the idea to a better implementation of not only this issue. I am ashamed) Thank you. - DrQ

0