Put the focus in the table

Hi,

For the "Type Refactoring" plug-in I'm using a class derived from
DialogWrapper. I want to put the focus in the JTable, but IDEA puts it to
the OK button. SwingUtilities.invokeLater() does not work. Any other idea?

Tom

2 comments
Comment actions Permalink

Thomas Singer (MoTJ) wrote:

Hi,

For the "Type Refactoring" plug-in I'm using a class derived from
DialogWrapper. I want to put the focus in the JTable, but IDEA puts it
to the OK button. SwingUtilities.invokeLater() does not work. Any other
idea?

Tom


Have you tried to override the getPreferredFocusedComponent() method of
DialogWrapper? That should work.

Sascha

0
Comment actions Permalink

No, I haven't, but thanks for the hint. :)

Tom

0

Please sign in to leave a comment.