Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting min\max number of caret positions for a line  RSS feed

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!!
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!