To front and focus

Hello and thanks for an awesome library.

I’m having a focus issue with some stacked dockables.

I have some tables and detail panels housed in dockables. The normal configuration is to show the 2 table dockables and stack the detail ones. This way when the user selects one of the rows in the tables then the detail data can be filled in and the right detail dockable can be 'toFront’ed.

That all works great. However, the second time one of the detail dockables is brought to the front…it keeps the focus on the dockable rather than having it transfered to the contained component. In fact it won’t relinquish that focus until I maximize and then minimize the dockable or I manually select a different dockable on the stack and back. With the Max/Min process I can toFront it again with the proper behavior once, however by just switching stacked dockables I don’t get that first time behavior.

The only thing I’m doing out of the ordinary that I can think of is the fact that I’m rebuilding the components on the detail panel (not the panel itself) when it is being brought to the front. (ie removeall and adding new ones) Shouldn’t matter…but maybe the child focusable isn’t available at the right time?

Thanks again for this excellent library…very stable, very usable!

I’ll have a closer look at the issue in any case, but that could take I while (certainly not this weekend).

I guess this could be an issue. Just for a quick and dirty test (please don’t spend too much time on this): Do you have any chance of not rebuilding the Components? If yes do you still have the issue?

Can you give me the code calling „toFront“? I guess it is just some MouseListener, but after years of playing support I learned to always ask for code :wink:

Thanks for getting back so quickly. I found the problem…nothing to do with DockingFrames. I was just not calling revalidate on the panel after clearing and adding the new components.

Thanks again!