Docking inside externalized dialogs

Hi Beni,

I noticed a problem with focus when working with external dialogs.
I also happens without SplitDockStations in external dialogs,
but you can use the above example to reproduce the problem:

  1. run above code (Dock58)
  2. externalize Green
  3. make sure that Green’s tab has focus (by clicking on the tab)
  4. click on the title bar of the main application
    Neither Red nor Blue get selected and Green has a “focused but inactive” color.
    It is the same color the focused tab gets when you select a different application.

Same happens in the main window:
5. click on Red tab - red tab is focused
6. click on the resizing/moving border of the external window containing Green (not on tab or content)
Again, Red’s tab is dark gray (win7) as if you clicked on another application.

Does the framework handle such cases or should the application take care
of focusing the appropriate dockable?

kind regards,
Maciej Modelski

The framework cannot transfer the focus to the correct Dockable: transfering the focus would mean to acquire the focus, but there is no way to ensure that the user did not want some other Component to be focused. So the framework hopes that Swing will refocus the correct Component and tries to catch that event.

This gets further complicated in the example as there are not many focusable Components :-/