Re: Showing text cursor in JTextPane
- From: IchBin <weconsul@xxxxxxx>
- Date: Sat, 24 Jun 2006 17:09:44 -0400
Jim Rootham wrote:
What has to be true for a text cursor to show in a JTextPane?Do you have text in JTextPanes?
I have a dynamic set of JTextPanes that may or may not have focus. Sometimes when they have focus the text cursor does not display. What do I need to do to force it to display?
Thanks
Jim Rootham
Could the cursor be sitting at the end of the text in the JTextPanes?
If you mean by dynamic that you insert the text then maybe the cursor is at the end of the inserted text. This would not be visible.
Override DefaultCaret.adjustVisibility() to do nothing.
or
set caret position: setCaretPosition(int position)
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-)
.
- Follow-Ups:
- Re: Showing text cursor in JTextPane
- From: Jim Rootham
- Re: Showing text cursor in JTextPane
- References:
- Showing text cursor in JTextPane
- From: Jim Rootham
- Showing text cursor in JTextPane
- Prev by Date: Showing text cursor in JTextPane
- Next by Date: Re: Showing text cursor in JTextPane
- Previous by thread: Showing text cursor in JTextPane
- Next by thread: Re: Showing text cursor in JTextPane
- Index(es):