Changing the forground of a date using DateChooserCombo
I am trying to find a way to change the forground color of a specific date if certain requirements are meet. I am not sure how to go about this.
I have the following.
Code :
public FrameDateHighLightTest(){
initComp();
datTesting.setForeground(Color.red);
}
initComp(){
//The following is auto generated by netbeans
private datechooser.beans.DateChooserCombo datTesting = new datechooser.beans.DateChooserCombo();
datTesting.setNothingAllowed(false);
datTesting .setBehavior(datechooser.model.multiple.MultyModelBehavior.SELECT_SINGLE);
datTesting.addSelectionChangedListener(new datechooser.events.SelectionChangedListener() {
public void onSelectionChange(datechooser.events.SelectionChangedEvent evt) {
datTestingOnSelectionChange(evt);
}
});
getContentPane().add(datTesting, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 20, 140, -1));
}
I figure even if setForeground worked; which it's not, it stays black, it seems it would set all the dates to red. I am trying to find a way to do this for a specific date. For example say I want July 4, 2012 to be red, how could I change the foreground to red just for that date on the calendar?
Any helpful links or code would be appeciated.
Thanks.