Java JButton更改翻转边框颜色 [英] java jbutton change rollover border color

查看:83
本文介绍了Java JButton更改翻转边框颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您将鼠标悬停在Jbutton上时,会出现一个灰色边框,以显示鼠标悬停效果.有没有简单的方法可以将边框的颜色更改为红色?

When you roll over a Jbutton there's a greyish border that comes up to show the rollover effect. Is there a simple way to change the color of that border say to red?

推荐答案

您将必须针对所使用的外观调整UI Default.这很简单,但是找到正确的变量名进行正常调整是耗时的部分.

You would have to tweak the UI Default for what ever look and feel you are using. This is simple, but finding the correct variable name to adjust normally is the time consuming part.

这篇关于Java JButton更改翻转边框颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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