I have defined the check /uncheck image for checkbox ( in the GUI bilder constants) . When i use the checkbox in the GUI builder. It shows corectly(the unselcted/pressed/selected state). BUt when i try to manually add the checkbox (setting the same UIID as the GUI builder checkbox), the look is different.
I have attached the screen shot. Both the checkbox are in the pressed state.
The top checkbox is directly added in the GUI. and the second checkbox(black background - seems to be the default style) is added from the code.
CheckBox cb = new CheckBox();
cb.setSelected(true);
cb.setEnabled(true);
cb.setName(h.getChildAt(i).getAttribute("Name"));
cb.setText(h.getChildAt(i).getAttribute("Name"));
cb.setUIID("SettingsCheckBox"); //UIID is same as set in the gui checkbox
cb.setGap(10);
((Button)cb).addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt) {
}
});
HOw to remove the default style from the second checkbox