Reputation: 389
I have two text fields, and text_field2 text_fiel1. when the program is run directly to the text cursor automatically text_field1. I want to ask how can I make the text cursor when the program is run automatically in text_field2 not in text_cursor1???
Upvotes: 1
Views: 13746
Reputation: 11751
requestFocus() method of JTextfield will do. look at this http://www.java2s.com/Code/JavaAPI/javax.swing/JTextFieldrequestFocus.htm
Upvotes: 8