Swing Date Selection using the JDatePicker Suite

May 2010


Table of Contents

1. Introduction
1. What is the JDatePicker Suite
2. Requirements
3. How to Install
4. IDE Integration
4.1. NetBeans
4.2. Borland JBuilder
4.3. IntelliJ IDEA
5. What's New
5.1. Version 4.3.25 (May 2010)
5.2. Version 4.3 (January 8, 2007)
5.3. Version 4.2 (May 1, 2006)
5.4. Version 4.1 (October 19, 2005)
5.5. Version 4.0 (April 7, 2005)
5.6. Version 3.3 (December 17, 2004)
5.7. Version 3.2 (October 12, 2004)
5.8. Version 3.1 (August 30, 2004)
5.9. Version 3.0 (June 18, 2004)
5.10. Version 2.4 (May 3, 2004)
5.11. Version 2.3.1 (April 15, 2004)
5.12. Version 2.3 (March 25, 2004)
5.13. Version 2.2 (February 23, 2004)
5.14. Version 2.1 (February 2, 2004)
5.15. Version 2.0.1 (January 21, 2004)
5.16. Version 2.0 (December 15, 2003)
6. Known Issues
6.1. Instantiation fails on applet reload
6.2. ColorUIResource NPE
6.3. JGoodies Plastic LF integration
7. Frequently Asked Questions
8. More Help
2. How to Use the Components
1. Before We Begin
2. Using a JDateComponent
2.1. Selecting a Date
2.2. Allowing Empty Selection or Null Dates
2.3. Concepts: About Date Selection Models
2.4. Listening for Changes on Date Selection Model
2.5. Implementing a Date Selection Model
2.6. Listening for Action Events
2.7. Associating Date Actions with Key Strokes
2.8. Disabling the Component
3. Using a JDateEditComponent
3.1. Setting an Appropriate Date Format
3.2. Concepts: About Date Models
3.3. Listening for Changes on Date Model
3.4. Concepts: About Date Parsers
3.5. Implementing a Date Parser
3.6. Configuring Validation Behavior
3.7. Configuring Editing Behavior
4. Using the JDatePicker Component
4.1. Working with an Editable Date Picker
4.2. Changing the Background Color
4.3. Configuring the Popup Calendar
4.4. Localizing the Component
4.5. Using a Custom Look and Feel
4.6. Installing a Date Cell Editor for JTable
5. Using the JDateField Component
6. Using a JMonth Component
6.1. Selecting Dates
6.2. Changing the Selection Type
6.3. Localizing the Component
6.4. Changing Colors and Font
6.5. Concepts: About Date Renderers
6.6. Implementing a Date Renderer
6.7. Configuring the Grid
6.8. Showing Trailing Dates
6.9. Showing Week Numbers and Day Names
6.10. Selecting Dates with Simple Mouse-Clicks
6.11. Using the Keyboard
7. Using a JMonth Component - Expert Features
7.1. Concepts: About Month Models
7.2. Listening for Changes on Month Model
7.3. Implementing a Month Model
7.4. Change the Displayed Month
7.5. Enabling Week Selections
7.6. Concepts: About Week Models
7.7. Listening for Changes on Week Model
7.8. Implementing a Week Model
7.9. Specify when the Week Starts
7.10. Using ISO week numbers
8. Using the JMonthView Component
8.1. Using Multiple Months
8.2. Localizing the Component
8.3. Allowing Empty Selection
8.4. Changing Scrolling Behavior
8.5. Showing the Today Button
8.6. Showing the Status Bar
3. Advanced Topics
1. How to Create a Completely New Look for the Components
1.1. Concepts: About UI delegates
1.2. Per-Application vs Per-Component Customization
1.3. Creating a Custom UI Delegate
1.4. Example 1: Read-Only Calendar Title
1.5. Example 2: Spinner Calendar (Windows Date/Time Calendar)
1.6. Example 3: Image Scroll Buttons for the Calendar
2. ADF JClient Binding
3. JGoodies Binding
4. JBuilder's dbSwing Binding
A. License Agreement

List of Figures

2.1. JDatePicker Suite API Structure
2.2. A demo application for a JDateComponent
2.3. A demo application for a JDateEditComponent
2.4. A demo application for the JDatePicker component
2.5. A demo application for a JMonth component
2.6. A demo application for the JMonthView component
3.1. A demo application for the JGoodies data binding framework

List of Tables

2.1. Keyboard Interface