This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes move curser marker Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "move curser marker" Watch "move curser marker" New topic

move curser marker

sara rod

Joined: Dec 07, 2009
Posts: 23

I have textarea and I need to move the cursor marker - to the first line, it is by default in the end of the text.
how can I do that?

Chris Nash

Joined: May 20, 2009
Posts: 28
Not that I've ever done it, but from looking at the API, it looks like setCaretPosition() will do the trick. HTH

- Frecklefoot
"What you are good at is not as important as being good at something." --Robert B.Parker
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: move curser marker