cursor in jtextpane

hi,How can I get cursor in the textpane , while the user is entering data in textpane through button event...thnx
[134 byte] By [devsua] at [2007-11-27 3:20:32]
# 1

The cursor is only painted if the text component has focus.

So if you click on a button, the button will have focus. You can

a) use button.setFocusable(false), then focus will remain on the text component

b) or in the actionPerformed code you add textComponent.requestFocusInWindow();

camickra at 2007-7-12 8:23:15 > top of Java-index,Desktop,Core GUI APIs...
# 2
wowww thank u very much
devsua at 2007-7-12 8:23:15 > top of Java-index,Desktop,Core GUI APIs...