Focus

Howdy all!

Using only awt in jdk 1.18, is it possible to shift focus (i.e put text cursor inside) a TextArea?

I want to do this in response to a button click - so my actionPerformed method does some other processing and then shifts the text cursor into the text area for easy data entry by the user..

Thanks!

Rob

:)

:-}

;->

[376 byte] By [endearment] at [2007-9-27 18:48:44]
# 1
under your actionPerformed method, add:textArea.grabFocus();
Poop at 2007-7-6 20:11:45 > top of Java-index,Archived Forums,Java Programming...
# 2
Howdy!Thanks for the response but I am not using any part of Swing - grabFocus() is a method on JComponent. I am only using awt!Rob
endearment at 2007-7-6 20:11:45 > top of Java-index,Archived Forums,Java Programming...