如何制作简单平面风格的JButton? [英] Howto make JButton with simple flat style?

查看:84
本文介绍了如何制作简单平面风格的JButton?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最简单的方法是让JButton只显示背景颜色?我不需要任何其他效果,如边框,3D外观或悬停突出显示。

whats the most simple way to make a JButton only show the background color? I don't need any other effects like borders, 3D-look or hover-highlighting.

提前致谢。

推荐答案

我不知道我是否错过了一个点...
但我通常会这样做:

I don't know if I have missed a point... But I usually do somtehing like this:

button.setBorderPainted(false);
button.setFocusPainted(false);
button.setContentAreaFilled(false);

这篇关于如何制作简单平面风格的JButton?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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