>I am trying to custumize a JCheckbox by changing the color of the
>checkmark , but i dont know how !!
The official way to do that would be to create your own custom look
and feel variant. see http://mindprod.com/jgloss/laf.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Laird Nelson - 19 Jun 2007 13:45 GMT
On Jun 19, 4:47 am, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> The official way to do that would be to create your own custom look
> and feel variant. seehttp://mindprod.com/jgloss/laf.html
Seems like you could simply install your own icon under the UIDefaults
key "CheckBoxUI.icon". By default, you get the one manufactured by
BasicIconFactory.getCheckBoxIcon().
Laird
> Hello,
>
> I am trying to custumize a JCheckbox by changing the color of the
> checkmark , but i dont know how !!
> any idea ?
Open the source code of MetalIconFactory
copy the static inner class CheckBoxIcon
add it as an inner class to your program
change the color in drawCheck()
set the new icon, either
a) use a CheckBox constructor with icon as argument, or
b) *both* checkbox.setIcon(...) and checkbox.setSelectedIcon(...)
deel007@googlemail.com - 21 Jun 2007 00:36 GMT
> Open the source code of MetalIconFactory
> copy the static inner class CheckBoxIcon
[quoted text clipped - 3 lines]
> a) use a CheckBox constructor with icon as argument, or
> b) *both* checkbox.setIcon(...) and checkbox.setSelectedIcon(...)
Thanks guys it works now.