[英]Completely remove visible border on JButton
Can anyone tell me how to remove this yellow pointed border around button? 谁能告诉我如何删除按钮周围的黄色尖角边框?
Following methods didn't do the job. 以下方法无法完成任务。
btnPdf.setBorder(BorderFactory.createEmptyBorder());
btnPdf.setContentAreaFilled(false);
btnPdf.setBorderPainted(false);
It could be caused by the button having focus. 这可能是因为按钮具有焦点。 Try adding
尝试添加
btnPdf.setFocusPainted(false);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.