检测JInternalFrame停用 [英] Detect JInternalFrame Deactivation

查看:99
本文介绍了检测JInternalFrame停用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在为我的Java应用程序制作Windows 8样式的Nimbus外观,这包括自定义标题栏的按钮,例如使用Windows 8 X按钮等。我的问题是在Windows 8中,最大化和最小化按钮与标题栏颜色相同,当窗口聚焦时这很好,但是当一个InternalFrame被取消激活时,我的程序模仿窗口并使其颜色变浅,所以现在有一个问题,因为图标不一样颜色如酒吧。我试着让它变得透明,但是这可以让你看到下面的原始图标,我真的不想改变每一个画家,只有最大化的图标大约有20个!有没有人知道一种简单的方法来检测帧何时被停用,然后更改按钮的图标?理想情况下,我希望它是一个附加到按钮本身的线程或监听器。

Hello, I am making a Windows 8 style Nimbus skin for my Java application, and this involved customizing the title bar's buttons, such as using windows 8 X buttons etc. My issue is that in Windows 8, the maximize and minimize buttons are the same color as the title bar, this is fine when the window is focused, but when a InternalFrame becomes deactivated, my program mimics windows and makes it a lighter color, so now there's an issue as the icon won't be the same color as the bar. I tried making it transparent, but this lets you see the original icon underneath, and I don't really want to change every single painter, there are around 20 for just the maximize icon! Does anyone know a simple way to detect when the frame is deactivated, then change the button's icon? Ideally I would want it to be a thread or listener attached to the button itself.

推荐答案

这篇关于检测JInternalFrame停用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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