Java Swing JXDatePicker [英] Java Swing JXDatePicker
问题描述
我使用的是SwingX JXDatePicker,我不知道如何提供下一个/上一年的按钮(默认情况下,它仅提供下一个/上一个月份的按钮).
而且,似乎SwingX不再维护了:我应该使用更新的组件作为日期选择器吗?
任何帮助/提示将不胜感激.谢谢托马斯
更新:
为澄清这个问题,我添加了一个JXDatePicker屏幕截图,并用红色突出显示了下一个/上一个月份的按钮.因此,问题是:如何添加将日历带到下一年/上一年的按钮?请注意,新按钮必须是标准组件,因为它们需要通过特定的外观进行渲染.感觉经理(在这种情况下为不实).
非常感谢
我建议使用Microba DatePicker.它是高度可定制的,并且可以完全满足您的需求.
.
主要网站: https://jdatepicker.org/
此功能仍受支持,并且似乎具有您想要的功能.
I'm using SwingX JXDatePicker and I can't figure out how to provide next/previous year buttons (as by default it only provides next/previous month buttons).
Also, it seems that SwingX is not maintained anymore: should I be using a more recent component as date picker?
Any help/hint would be greatly appreciated. Thanks, Thomas
UPDATE:
To clarify the question, I added a JXDatePicker screenshot and highlighted in red the next/previous month buttons. The questions is thus: how to add buttons that will bring the calendar to next/previous year? Please note that the new buttons need to be standard components as they need to be rendered by a particular Look & Feel manager (Insusbtantial in this case).
Many thanks
I would recommend using Microba DatePicker. It's highly customizable and does exactly what you want.
http://microba.sourceforge.net/
Edit:
Ok I see. Well I did some research and it seems the function you are looking for is actually not present in JXDatePicker.
A different alternative I found is: JDatePicker at http://sourceforge.net/projects/jdatepicker/.
Main website: https://jdatepicker.org/
This is still supported and seems to have the function you want.
这篇关于Java Swing JXDatePicker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!