JCalendar:如何更改某些日子的前景色?

发布于 2024-09-08 15:06:40 字数 191 浏览 2 评论 0原文

我正在使用 JCalendar v 1.3.3 组件,我想更改某些日子的前景色,默认当前日子有红色前景色,我想用其他颜色强调其他日子。可以使用现有的 API 来实现这一点,还是我必须修改源代码?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

回忆追雨的时光 2024-09-15 15:06:40

我相信您必须自定义 JDayChooser 组件才能实现这一点,因为默认情况下您只能更改星期日或工作日的前景色。

应该不会太难,看一下 JDayChooser 类中的 drawDayNames() 方法。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文