简体   繁体   中英

JCalendar: how to change the foreground color of certain days?

i'm using the JCalendar v 1.3.3 component and i want to change the foreground color of certain days, by default the present days has red foreground, i want to emphatize other days with other colors. It's posible to archieve this with the present API or i have to modify the source code?

I believe you'll have to customise the JDayChooser component to make this happen as by default you you can only change the foreground colour of Sundays or Weekdays.

It shouldn't be too hard, take a look at the method drawDayNames() in the JDayChooser class.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM