Hi I need to add a Round Border, that could be etched, beveled etc. for a JRadioButton. to allow the button to keep its round appearance.
but i cannot find any round borders.
does anyone know how to do this? chis
You can implement the Border
interface, using drawRoundRect()
or drawOval()
in paintBorder()
.
thanks thats one option, but im trying not to add my own implementation, as that would then limit reusability of the software by others.
i currently had JRadioButton.setBorder(new EchtedBorder(..)); JRadioBUtton.setBorderPainted(true); //to make it actually be drawn for the radiobutton.
but it then appears square, with the default radiobutton (thats round) inside.
I wondered if there was ay way to get the radiobutton to obay its natural roundness?
精彩评论