tags:

views:

14

answers:

1

Is it possible to maintain individual JFrame ordering? My java application populates individual JFrames always on top, My question is what could be the approach to populate another JFrames behind "already populated" JFrames but Always on top from other applications? Any suggestions, ideas appreciated. Thanks.

A: 

According to the Javadoc for Window's toBack() method:

Places this Window at the bottom of the stacking order and shows it behind any other Windows in this VM.

... which implies that the window isn't necessary placed behind other application windows. However, if this is the case one hack you could employ is:

  • Show the new window and call toFront() on it.
  • Then for each existing window call toFront() in order to shift the new window to the back of the pile.

In other words you'd be maintaining your own explicit Z-ordering somewhere in your application.

Adamski
Thanks for your reply, I will try the solution you mentioned.
ssjeet
You can upvote my answer too if you like :-)
Adamski