File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting min\max number of caret positions for a line

Barry Andrews
Ranch Hand
Posts: 523
C++ Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Does anyone know how to get the minimum and maximum caret position for a particular line in JEditorPane? It seems to be dependent on the font used and the size of the fonts. What I want to be able to do is using the current caret position, select the entire row. In order to do this I would need to know the min and max caret position for that line and the current position. Is this possible to do? Many thanks for your help!!
I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic