to set Focus on JTextField..
843806Jan 3 2008 — edited Jan 6 2008Hi,
I have a swing app and it has a JTextField and a JButton.
When the application starts, I want the cursor to already blink at the starting position. Presently I need to click on the JTextField and then the cursor comes. How do I solve this?
When the JButton is clicked "a" is added at the end of the text in the JTextField. Well and good. But then again the cursor disappears as soon as I click on the Button.. to get the cursor back in the text field .. i need to manually click on it and then the cursor starts blinking... I would like to have something like.. when I click the button the "a" character is added at the end of the text and ten the cursor automatically starts blinking.
How do I go about solving these two issues.. ( although I believe.. both these problems require only one solution.. )
Thanks