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!

cursor becomes invisible in JTextField after using default button

843806Jul 31 2009 — edited Aug 2 2009
In my application there is an update screen (JPanel). I am using default button in that panel. The input field is a normal JTextField. When the update is over the cursor goes back to the input JTextField.

Now my problem is that when I carry out update with mouse, the cursor is correctly placed into the input JTextField and is visible after the update is over. On the other hand, if I carry out the same update operation using default button (using keyboard), the cursor gets placed correctly in the input JTextfield column, but becomes invisible. If I minimize and then again maximize the window, the cursor appears back. What am I missing ? Note that I am using component.requestFocusInWindow() to get focus back to the input JTextField.

regards,
nirvan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 30 2009
Added on Jul 31 2009
16 comments
1,831 views