>>> What has to be true for a text cursor to show in a JTextPane?
>>>
[quoted text clipped - 31 lines]
>
> Jim Rootham
You will not find setCaretPosition under JTextPane because it is
inherited from JTextComponent.
setCaretPosition
public void setCaretPosition(int position)
Sets the position of the text insertion caret for the
TextComponent. Note that the caret tracks change, so this may move if
the underlying text of the component is changed. If the document is
null, does nothing. The position must be between 0 and the length of the
component's text or else an exception is thrown.
Parameters:
position - the position
Throws:
IllegalArgumentException - if the value supplied for position
is less than zero or greater than the component's text length
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.awardspace.com
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Jim Rootham - 25 Jun 2006 06:03 GMT
>>>> What has to be true for a text cursor to show in a JTextPane?
>>>>
[quoted text clipped - 51 lines]
> IllegalArgumentException - if the value supplied for position is
> less than zero or greater than the component's text length
Thanks for the pointer, unfortunately it didn't work.
Would a more careful listing of when the cursor appears and does not
appear help?
Jim Rootham
Jim Rootham - 26 Jun 2006 02:44 GMT
>>>>> What has to be true for a text cursor to show in a JTextPane?
>>>>>
[quoted text clipped - 58 lines]
>
> Jim Rootham
OK, I found it. Looking at the adjustVisibility documentation gave me
the clue. You have to call setEditable(true) before the focus gets to
the JtextPane. In this case it means calling setEditable from
MousePressed as opposed to MouseClicked.
Jim
IchBin - 26 Jun 2006 03:12 GMT
>>>>>> What has to be true for a text cursor to show in a JTextPane?
>>>>>>
[quoted text clipped - 65 lines]
>
> Jim
Cool...

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)