I'm trying to add an icon to a specific day into a JCalendar
, but I can't.
How can I do that?
I have this code:
final JCalendar calendar = new JCalendar();
JDayChooser day= calendar.getDayChooser();
day.setAlwaysFireDayProperty(true);
day.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent e) {
//put icon here
ImageIcon icon = new ImageIcon("icon.png");
JLabel label = new JLabel(icon);
day.add(label);
}
Edit: I want the icon in a day.