I have a frame with a button and a list. List is non-focusable. Initially button has the focus. But when clicking an item in the list, FOCUS_LOST is triggered for button with opposite component as List and the button regains the focus almost immediately, hence a FOCUS_GAINED event is triggered thereafter. I am actually trying to transfer the focus to the next component inside the action performed. So when double clicking the list, an action event is triggered but kfm.getFocusOwner() returns NULL though button always retains the focus. This is incorrect. Button should not trigger a focus lost event when clicking a non-focusable frame.
This is reproducible only on Win32 and not reproducible on Motif and XToolkit. This is reproducible right from 1.4.
Run the attached test on Win32. You will see a button and a list. Click an item in the list. Check the console. You will get a FOCUS_LOST and a FOCUS_GAINED event. Double click on any of the items in the list. You will see 'Focus Owner: null' message in the console.