【问题标题】:Removing lines around button after it's clicked in Swing [duplicate]在 Swing 中单击按钮后删除按钮周围的线条 [重复] 【发布时间】:2013-04-21 15:24:21 【问题描述】: 我在 Java(Swing) 中有一个 JButton: 点击后,我在按钮周围看到这条线: 如何删除这些行? 【问题讨论】: 此行为是设计使然。 (这叫焦点) look this post 标签: java swing button lines 【解决方案1】: button.setFocusPainted(false); 是正确的解决方案! 【讨论】: