Synth, can't use different styles in check boxes

K

Kgbol

Hi , when i tried to create 2 different styles of check boxes in xml
file the program had an exception, and used default look and feal. I
put this styles like that:

<style id="cB1">
<imageIcon id="check_off" path="images/dziel.png"/>
<imageIcon id="check_on" path="images/dzielZaznaczony.png"/>
<property key="CheckBox.icon" value="check_off"/>
<state value="SELECTED">
<property key="CheckBox.icon" value="check_on"/>
</state>
</style>
<bind style="cB1" type="name" key="box1"/>

<style id="cB2">
<imageIcon id="check_off" path="images/razy.png"/>
<imageIcon id="check_on" path="images/razyZaznaczony.png"/>
<property key="CheckBox.icon" value="check_off"/>
<state value="SELECTED">
<property key="CheckBox.icon" value="check_on"/>
</state>
</style>
<bind style="cB2" type="name" key="box2"/>

when i comment one of those styles the program uses Synth look & feel.
My question is, why does it happen? And can i do somenthing about it.
 
K

Kgbol

OK i solve it myself, i had the same ImageIcon id's for both check
boxes. They should to have different names.

.............
<imageIcon id="check_off" path="images/dziel.png"/>
<imageIcon id="check_on" path="images/dzielZaznaczony.png"/>
.............
<imageIcon id="check_off2" path="images/razy.png"/>
<imageIcon id="check_on2" path="images/razyZaznaczony.png"/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top