How to move minimized components placed at the bottom of the container?

后端 未结 2 1769
臣服心动
臣服心动 2021-01-20 02:01

I have three components in a container and buttons in it. When I hit the minimize button the components gets minimized to the bottom of the container and when I hit the mini

2条回答
  •  北海茫月
    2021-01-20 02:25

    Something like that:

    jdp.setDesktopManager( new DefaultDesktopManager(){
        @Override
        public void deiconifyFrame(JInternalFrame f) {
            super.deiconifyFrame(f);
            JDesktopPane d = f.getDesktopPane();
             JInternalFrame[] frames = d.getAllFrames();
             for(JInternalFrame frame : frames ) {
                 Rectangle bounds = getBoundsForIconOf(frame);
                  // relayout all frames
             }
        }
    });
    

提交回复
热议问题