Receive cursor position in a JTextField
- From: "Hans-Henning.Gabriel" <hanhengab@xxxxxxx>
- Date: Thu, 30 Jun 2005 21:36:07 +0200
Hi,
I have a JTextField, and I have text in it. For example the string “example text”.
The user can position the curser in the JTextField for example between p and l.
My problem: I need a method that gives me the position of the cursor in the JTextField. For the example the method should return 5, because the cursor is positioned behind the 5th letter (the p).
How should such a method look like? Or how in principle can I do this?
Thanks! .
- Follow-Ups:
- Re: Receive cursor position in a JTextField
- From: Andrew Thompson
- Re: Receive cursor position in a JTextField
- Prev by Date: How long to get up to speed with SWT?
- Next by Date: Re: Truncated Label Problem
- Previous by thread: How long to get up to speed with SWT?
- Next by thread: Re: Receive cursor position in a JTextField
- Index(es):
Relevant Pages
|
|