Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting min\max number of caret positions for a line

 
Barry Andrews
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • 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!!
Barry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic