[英]How to remove the box surrounding the text inside a JButton?
this image shows the box这张图片显示了盒子
When I run JFrame
a small box is surrounding the text in the focused JButton
(See the picture attached)当我运行JFrame
时,焦点JButton
中的文本周围有一个小框(见附图)
How can I remove that box?我怎样才能去掉那个盒子?
This property is called focusPainted
and you can disable it by: jbutton.setFocusPainted(false);
此属性称为focusPainted
,您可以通过以下方式禁用它: jbutton.setFocusPainted(false);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.