default Button « Focus « Java Swing Q&A





1. Is it possible to make a JComponent default to not-focusable?    stackoverflow.com

I know you can call JComponent.setFocusable(false) to make a Java component not be focusable. But since I have a LOT of components in my application that I want to be that ...

2. Default focus traversal policy in AWT and Swing    coderanch.com

Hi, Does anyone know why the default focus traversal for Swing applications is layout based and for AWT, it's container based? I am looking for some history as to why Swing didn't stay with the container based policy. Maybe a document from Sun or something. Google did not turn up anything useful. thanks, Barry

3. to get default focus    coderanch.com

textfield.requestFocusInWindow() is the method, but if you are talking about when the program first opens, the method must be called after the program's visibility is set to true. if you are using 1.5, there have been some changes to the focus subsystem that causes the above method not to work properly. in this case try wrapping the method in a SwingUtilities.invokeLater(), ...

4. JSpinner.DateEditor - Set default focus on dd    coderanch.com

Overriding the getNextValue in the spinner date model works but it always increments the day, even if the focus is on the year. I would like the spinner to increment the day when the focus is on the day. I would like to set the initial focus to the day (dd) instead of the year. Thanks for your help, I really ...