Textfield focus

Question:
I have a frame with a few textfields on it. How can I set the focus to the first textfield? Is there something like setFocus?

Answer:
A component can obtain the input focus by invoking requestFocus(), which is defined in java.awt.Component.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: