Results 1 to 2 of 2
  1. #1
    Mash is offline Member
    Join Date
    Apr 2010
    Posts
    4
    Rep Power
    0

    Default The ( x, y ) coordinates of the caret Position in JTextPane

    Hello All,

    Is there a simple way to get the (x,y) coordinates of the caret position in a JTextPane? The method jTextPane.getCaretPosition() returns only the absolute offset.

    Thanks in advance.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. button coordinates
    By jacline in forum AWT / Swing
    Replies: 2
    Last Post: 04-05-2009, 10:58 PM
  2. get position in string from caret position
    By helloworld111 in forum AWT / Swing
    Replies: 5
    Last Post: 02-19-2009, 01:36 AM
  3. Creating a caret in SWT
    By Java Tip in forum SWT
    Replies: 0
    Last Post: 07-02-2008, 07:52 PM
  4. Creating a caret (using an image) in SWT
    By Java Tip in forum SWT
    Replies: 0
    Last Post: 07-02-2008, 07:51 PM
  5. How to use TextLayout with Caret
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-25-2008, 10:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •