Problems with default button...
Hello,
I have some problems concerning the default button.
MyJDialog which is called from within my application (JFrame) sets the default button ininitComponents() (called by the constructor):
getRootPane().setDefaultButton(jButton1);
When opening the dialog for the first time everything works... which means pressing enter invokes the default button - but when opening the dialog again pressing enter doesn't invoke the default button (nothing happens).
TheJDialog is created only once - future calls to open the dialog use
myDialog.setVisible(true);
to display it.
Another point is when I open the dialog for the second time for example, the recent search results are displayed (my dialog contains aJTable with search results the user can select from) and the row which was selected by the user is highlighted (selected) - is that what causes the problem?
Any help would be greatly appreciated
- Stephan

