Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Caret and Focus in JTextField

EdChouaffeFeb 16 2011 — edited Feb 18 2011
Hi Guys.

I have a JTextField and many other components all placed within a JDialog. Now, I really wonder why the JTextfield always gets the focus and as a result gets its carez shown.
I intend to achieve that the TextField gets the focus only when I click on it. I have called getCaret().setVisible(false) on the TextField but the caret is still blinking.

Thank you in advance for any constructive answer.

Edmond
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2011
Added on Feb 16 2011
16 comments
1,303 views