Hi,
May i know how do i go about setting focus on a JTextField when my window is opened? As in, when I compiled and run the application, the focus is on the JTextField I specified.
Thank you.
Printable View
Hi,
May i know how do i go about setting focus on a JTextField when my window is opened? As in, when I compiled and run the application, the focus is on the JTextField I specified.
Thank you.
Believe you can use setFocus();
Try this :
Code:nameField.requestFocus();
Yep, that's it requestFocus();
Sorry there lex.