How to set the standard Iconified location for a JInternalFrame?

守給你的承諾、 提交于 2019-12-12 02:05:11

问题


I've got a class extending JDesktopPane in which I have a JInternalFrame, which I can Iconify, I really like this, but when I iconify it, it goes to the left, bottom side of my screen. I'd like to change this to the right, top side of the screen. Does anyone have any suggestions on how to set that location?


回答1:


You're using the DefaultDesktopManager to manage your JDesktopPane.

The DefaultDesktopManager class implements the DesktopManager interface.

Looking at the source code for DefaultDesktopManager, the getBoundsForIconOf method is protected. You might be able to extend DefaultDesktopManager to get the icon behavior that you want. Otherwise, you'll have to write your own implementation of the DesktopManager interface.



来源:https://stackoverflow.com/questions/14754724/how-to-set-the-standard-iconified-location-for-a-jinternalframe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!