Java JFrame popup ordering (should be always on top but behind old JFrames)
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.
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.
精彩评论