문제

I'm trying to have JToggleButton buttons that don't have a border normally, and just show the icons I provide. But then when they are clicked, I want the selected button to show.

I know that by using setLayout(null). The initial state works, but then when I click it, the border doesn't show up. There must be some simple border call I'm missing. Does anyone know how to accomplish this?

http://imgur.com/ekkraJA,DBRtp4C

http://imgur.com/ekkraJA,DBRtp4C#1

도움이 되었습니까?

해결책

Not sure I understand the question but maybe the following will help:

button.setBorderPainted(false);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top