【问题标题】:How to remove the box surrounding the text inside a JButton?如何删除 JButton 内文本周围的框?
【发布时间】:2019-10-27 19:06:52
【问题描述】:

this image shows the box

当我运行JFrame 时,一个小框围绕着焦点JButton 中的文本(见附图)

我怎样才能去掉那个盒子?

【问题讨论】:

标签: java swing focus jbutton


【解决方案1】:

此属性称为focusPainted,您可以通过以下方式禁用它: jbutton.setFocusPainted(false);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-11-17
    • 1970-01-01
    • 2012-01-13
    • 2020-08-18
    • 2012-11-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多