The Artima Developer Community
Sponsored Link

Java Answers Forum
Java curser on a text field

2 replies on 1 page. Most recent reply: Aug 8, 2002 12:29 AM by Bin Zhang

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Jim Dunn

Posts: 1
Nickname: jim
Registered: Jul, 2002

Java curser on a text field Posted: Jul 9, 2002 9:44 AM
Reply to this message Reply
Advertisement
How can I get java to remember where the curser was on a text field after selecting a Lookup button


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Java curser on a text field Posted: Jul 9, 2002 12:51 PM
Reply to this message Reply
Use getCaret() to get the caret object. See getMark() and get/set/moveDot(), depending upon whether there is selected text and where you'd like the cursor to be relative to it, when you return -- you may also want to reselect the text as it was.

Bin Zhang

Posts: 4
Nickname: matrix
Registered: Aug, 2002

Re: Java curser on a text field Posted: Aug 8, 2002 12:29 AM
Reply to this message Reply
using the method
setCaretPOsition(int position);

Flat View: This topic has 2 replies on 1 page
Topic: Nested for loops Previous Topic   Next Topic Topic: sockets

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use