如何更改 JFrame 中标题栏的颜色? [英] How to change the color of titlebar in JFrame?

查看:49
本文介绍了如何更改 JFrame 中标题栏的颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下代码,

UIManager.put("JFrame.activeTitleBackground", Color.red);

用于更改 JFrame 中的工具栏颜色.但是没有用.

for change the toolbar color in JFrame. But it didn't work.

是否可以更改 JFrame 中标题栏的颜色?

Is it possible to change the color of titlebar in JFrame?

推荐答案

这不可能.顶层 JFrame 由外观控制底层操作系统的感觉.

Its not possible. The top level JFrame is controlled by the look & feel of the underlying OS.

您可以更改 InternalFrame 的颜色.

You CAN change the color of an InternalFrame.

这篇关于如何更改 JFrame 中标题栏的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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