문제

I want to have a JFrame that is always on top of another 'parent' frame but not always on top of everything

I have attempted to use:

  1. JInternalFrame -- doesn't work because I have to use JDesktopPane which is unnaceptable because the parent frame relies on a Border layout.
  2. JFrame with setAlwaysOnTop(true) -- doesn't work because I only want it to be on top of its parent frame

I'm imagining a method like setAlwaysOnTopOf(JFrame parent). Is there a way to do this?

도움이 되었습니까?

해결책

I want to have a JFrame that is always on top of another 'parent' frame

Applications should only contain a single JFrame. If you need a child window then use a (modal?) JDialog and specify the frame as the parent.

다른 팁

that depends on which container you are using... bind your jFrame to the container.. try with add method..

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top