如何为JInternalFrame设置标准的图标化位置? [英] How to set the standard Iconified location for a JInternalFrame?

查看:250
本文介绍了如何为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.

这篇关于如何为JInternalFrame设置标准的图标化位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆