How do I open a JInternalFrame centered in a JDesktopPane?

后端 未结 5 1630
礼貌的吻别
礼貌的吻别 2021-01-05 09:21

I am adding a bunch of JInternalFrames into a JDesktopPane, as the user selects to open various features through the menus. But I would like the in

5条回答
  •  不思量自难忘°
    2021-01-05 10:02

    Work out the top-left corner of the new location (based on the size of the JDesktopPane and JInternalFrame) and then call JInternalFrame.setLocation.

提交回复
热议问题