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!

JDialog Focus issues in JRE 1.6

843807Aug 17 2007 — edited Oct 30 2007
I have an Applet (signed) in a web page that opens up a modal JDialog to get a date using an array of labels which the user can navigate through using the keyboard or mouse.

In JRE 1.5.0_05 this worked great but on using exactly the same code with JRE 1.6, the JDialog does not appear to get the focus after I call setVisible(true). Only when I click in the dialog do the focus event methods get fired.

I've made all the fields in the dialog focusable and I've tried calling requestFocus() before I show the dialog (tried this on EventQueue.InvokeLater() too) all to no avail.

Can anyone explain this change in focus behaviour and, ideally, suggest a solution?

[See my original post in the Swing forum for more details and some example code http://forum.java.sun.com/thread.jspa?threadID=5194083]
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 28 2007
Added on Aug 17 2007
7 comments
379 views