如何为JInternalFrame设置标准的图标化位置?
我有一个扩展JDesktopPane的类,其中有一个JInternalFrame,我可以Iconify,我真的很喜欢,但是当我对其进行图标化时,它位于屏幕的左下侧.我想将其更改为屏幕的右侧.有人对如何设置该位置有任何建议吗?
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?
You're using the DefaultDesktopManager to manage your JDesktopPane
.
DefaultDesktopManager
类实现了 DesktopManager 界面.
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.