JButton

Hi all is there anyway to make a JButton to be default in a dialog box? I found that there are only 3 methods which are:

isDefaultButton()

isDefaultCapable()

setDefaultCapable()

But these methods are not useful in setting a JButton to be default in a dialog box. what do i do? Plz help and thanx in advance.

[338 byte] By [Aswin] at [2007-9-30 20:33:13]
# 1
KeyboardFocusManager.setGlobalCurrentFocusCycleRoot(Container c) will work
Mythicwolf at 2007-7-7 1:22:44 > top of Java-index,Administration Tools,Sun Connection...
# 2
oops wrong one...i meant:KeyboardFocusManager.setGlobalFocusOwner(Component c)
Mythicwolf at 2007-7-7 1:22:44 > top of Java-index,Administration Tools,Sun Connection...
# 3
Hi!! thanks 4 ur reply. I got one more alternative. It is getRootPane().setDefaultButton(myButton);
Aswin at 2007-7-7 1:22:44 > top of Java-index,Administration Tools,Sun Connection...