Re: Cursor in an uneditable textpane? (or getting chars as they are typed)
- From: Daniel <daik.no-spam@xxxxxxxxxxxxxxxxx>
- Date: Sat, 23 Apr 2005 23:19:56 +0200
I just discovered that getting the caret via
JTextPane t ...
Caret c= t.getCaret();
.....
c.setVisible(true);
works for the given situation
/daniel
>Hi,
>I have an application that's lets the user type text into a JTextPane.
>I transmit this text char by char as it is typed (requirement for the
>application) over the network. This means that I can not let the user
>type anywhere s/he wants but only at the end of the currently typed
>text. At present this is done by setting the textpane notEnabled and
>then via a keyListener instert the text char by char myself into the
>pane.
>Now it's not very good for the user not to have a cursor while typing,
>so can I get a cursor visible and still only allow the user to
>insert(i.e type) text at the very end of the text?
>
>---
>Daniel
>http://www.daik.se
.
- References:
- Prev by Date: Cursor in an uneditable textpane? (or getting chars as they are typed)
- Next by Date: left justify icon in JTable cell
- Previous by thread: Cursor in an uneditable textpane? (or getting chars as they are typed)
- Next by thread: Re: Cursor in an uneditable textpane? (or getting chars as they are typed)
- Index(es):
Relevant Pages
|
|