开发者

how to add a round border to a jradiobutton

开发者 https://www.devze.com 2023-01-28 04:46 出处:网络
开发者_开发问答Hi I need to add a Round Border, that could be etched, beveled etc. for a JRadioButton.
开发者_开发问答

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消