Tuesday, April 19, 2011

JCalendarWidget

JCalendarWidget is a highly customizable, multi lingual Calendar component for graphically picking a date.It renders a calendar including the days of the week, the weeks of the year, and the days of the month and can be easily used in GUI builders.

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.

1 comment: