There is a setFocusable() method in Component. Does that actually do what you want?
There is aJava Tutorial section about focus, and this website has the Java focus system specification in.
If radioButton.setFocusable(false); doesn't work, is it really the focus you are looking for?
posted 14 years ago
i have a panel in a main content pane, it contains three radio buttons and takes the focus away from the content pain of the main applet when the radio buttons are pressed. I need to keep the focus on the applets content pane in order to allow the animations i have going on to still be activated by the key listeners.
Set focusable(false); has worked really well for all of the other buttons and textfields i have used, and i have tried setting the panels that the radio buttons are on as false, but alas, no joy.
The radio buttons are also in another class which complicates matters slightly.