Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_java thread: how to use setCaret function ?


Message #1 by "Hassan Ansari" <misbah_ansari@y...> on Wed, 5 Feb 2003 23:21:34
A Caret is a "cursor" within text, indicating where your typing position
currently is.

It's sounds like you're trying to focus on a particular control, vs. trying
to set your typing position within a single text component.  I would suggest
reading the following tutorial:

http://java.sun.com/docs/books/tutorial/uiswing/events/focuslistener.html


----- Original Message -----
From: "Hassan Ansari" <misbah_ansari@y...>
To: "Professional Java" <pro_java@p...>
Sent: Wednesday, February 05, 2003 11:21 PM
Subject: [pro_java] how to use setCaret function ?


> Hello all,
> I just want to know how to use setCaret function.I am runnig an applet and
> i want focus into the first textbox on the applet after the applet is
> initialized.I studied setCaret function in java's help it takes only one
> parameter as Caret.The question is whose caret we would get using getCaret
> method before we could set to Applet's first textbox using setCaret
method.
> i will be greatful.
> Thanks in advance.
> Bye,
> Misbah H. Ansari
>


  Return to Index