I have a desktop pane to which I am adding two "types" of JInternalFrames:
- type 1 are frames that are actually closed when a user closes them ( default close operation is DISPOSE )
- type 2 just get hidden ( setVisible(false), default close operation is HIDE ).
When I have only type 1 frames open and close any of them, another one automatically gains focus.
When I have a mix of type 1 and type 2 frames and close a type 1 frame, another one automatically gains focus ( regardless whether it is of type 1 or type 2 ).
when I have a mix of type 1 and type 2 frames and close a type 2 frame, none of the other frames gains focus.
Could anyone tell me why it is so? I need the functionality because depending on which frame is activated, different menu and different buttons have to be visible.
I add an InternalFrameListener to the newly created frames and overwrite the internalFrameActivated method - it all works perfectly, just in the last case I can see
that the type 2 frame gets deactivated, but none of the other frames gets activated in turn.