jQuery in Action, 2nd edition*
The moose likes Swing / AWT / SWT and the fly likes Cursor handling in JTextArea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Cursor handling in JTextArea" Watch "Cursor handling in JTextArea" New topic
Author

Cursor handling in JTextArea

kumar mars
Ranch Hand

Joined: Jun 04, 2001
Posts: 34
hai
is there any way to dictate the movement of the cursor in JTextArea.
thanks in anticipation
bye


<BR>
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Here is a short program to show the use of the setCaretPosition() method of the JTextArea. This sets the position of the cursor (caret) in the JTextArea...



-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
kumar mars
Ranch Hand

Joined: Jun 04, 2001
Posts: 34
it doesnt suffise setting cursor position in terms of index
i need some way to specify the position exactly in tersms of pixels or some thing of that kind
 
Consider Paul's rocket mass heater.
 
subject: Cursor handling in JTextArea
 
Similar Threads
JTextArea & Cursor
WA #1.....word association
Text Area Problem... Pls Help
Make line break (go to new line) while writing text on JPanel
position cursor