Screenshots:
JCalendarWidget 1 |
JCalendarWidget 1(Month Selection View) |
JCalendarWidget 2 |
JCalendarWidget 2(Month Selection View) |
DatePicker withe date selected. |
Usage:
Add the bean to your pallete and drag the bean onto your form and customize it.
If not using a GUI builder(but why? try NetBeans)
//instantiate the JCalendarWidget JCalendarWidget widget = new JCalendarWidget(); // JDatePicker has overloaded constructor to specify the dateFormat //will use DateFormat.LONG as default JDatePicker picker = new JDatePicker(); //customize the widget widget.setHolidayForeground(Color.RED); widget.setHighlightHoliday(true); widget.setDatesFromPreviousAndNextMonthShown(true); //add the widget to datepicker picker.setCalendarWidet(picker);
The source for this control can be downloaded from google-code.
How is this better than SwingX JXDatePicker?
ReplyDelete