1.
***************
How do I add DatePicker.jar to my classpath if it is stored in the directory c:\dtpicker

->Just run DOS and write on the foll command on the dos prompt
	set classpath=c:\jdk1.2.1\lib; c:\jdk1.2.1\bin; . ;c:\dtpicker\DatePicker.jar

Don't miss out the "." in your classpath setting.

The . implies current directory.
(The classpath is similar to the PATH command of DOS it shows JAVA the path it should search for classes)


2.
***************
I created an applet using your classes,it works fine as a standalone,meaning by it works well
with appletviewer filename.java but if i had to use the same applet in a browser ,it gives me the error message:"unable to load the applet".


->You are not using DatePickerBean v 4.0

see the demo myapp.java & myapp.html
use the archive parameter in the applet tag


3.
***************
I would like to know more information of DatePickerBean and its location (url).


This Bean can be downloaded from the foll. sites (over 3000 downloads)

1 http://www.SIMTEL.NET/pub/pd/52374.shtml (has the complete description)
2 http://download.CNET.COM/downloads/0-14488-100-5339635.html 
3 http://www.ZDNET.com/downloads/stories/info/0,10615,75595,00.html


4.
***************
How to use the bean in an IDE 

If you are using an IDE ie. Sun Microsystems BDK or Forte , Visual Age, JDeveloper, etc.
-------------------------------------------------------------------------------------------
Figure out the way by which you can add a Bean to your Beans pallete
Then add this Bean using DatePicker.jar file
Once its on the  Beans pallete just drag its on your container ie. frame/applet/panel

eg. BDK
1.start Sun's BDK from file menu select -> load jar file 
2.From the file open dialog box select the DatePicker.jar file.	It adds to components panel
3.Select it and place it on the frame.

Thats All


5.
***************
I don't understand the Java Docs can you give some simple explantion.
Go through :- simpleexplanation.txt & steps.txt


6.
***************
I would like to get free & direct delivery of the new versions,bug fixes,etc. of this bean.
Go through:-  registeration.txt


7.
***************
I would like to launch the datepicker calendar from my own component.

You can use showCalendar methods. For an example, see showcal.java


8.
***************
Can DatePicker Help me validate a date from my own Date-Input component.

YES why not:

Create a datepicker object do not add it to any container(Frame/Applet/panel).

Accept the date from the user through your own component. 

Pass this Date to the various setDate methods of the DatePicker and trap the DatePickerException. 

Check if the DatePickerException is an instance of 

InvalidDateException, GreaterThanMaxDateException or LessThanMinDateException as per your requirements.

9.
***************
I want a feature by which the user can enter the day,month & year 
either by normally selecting them thropugh the calendar or by
directly enter them through the keyboard without going through the calendar.

Such a feature is not available right now but,

Here is a suggestion.
1.
You take  3 textfield (each for accepting the Day,Month & year) & 1 Button and place them adjacent to each other. 

Validate the textfields such that they accept only numbers & have the required max length 
ie. 2 for day & month and 4 for the year.

2.
Now create a DatePicker object (dp) in your application but do not add it to your panel/Frame/applet.

3.
Now whenever the user inputs the date using the textfields pass these values to the 
	dp.setDate(int,int,int) method of your DatePickerObject.

Trap the DatePickerException. 
Check if the DatePickerException is an instance of InvalidDateException, GreaterThanMaxDateException or LessThanMinDateException as per your requirements.


4. Now you may ask what is the use of the button that is placed beside the textfields.:
Well you can use this button to launch the DatePicker Calendar
	dp.showCalendar(); //check out showcal.java .

Also implement the DatePickerListener interface so that you are notified of the Date Changes.


10.
***************
Help on all the methods of DatePicker is available.
Just go to JavaDocs Directory & double click index.html.


11.
***************
Can I use DatePicker as a CellEditor for a JTable.
Yes you can. Just go through MyJTable.java it shows exactly that.


12.
***************
How to use a DateRange Effectively.
The DateRange can be set using setMinDate & setMaxDate methods.

Suppose you have have an Age section & you are accepting the Date of Birth and you want that the age should not be less than 18 yrs. Then you can set the MinDate accordingly in the DatePicker Object that is assigned to accept the DOB.

Suppose you need that the Date Entered should not be greater than TODAY. Then you could set the MaxDate part accordingly.

The user wont be able to select any date below the Mindate & any Date above the MaxDate

Check out DatePickerRange.java for some tips.


13.
***************
I want the date selected in my datepicker object in its current format.

You can get the actual date using the getDate() which returns the selected date as a GregorianCalendar object.

------>
If you want any date in a particular format specified in the DatePicker class use
	getFormattedDate(GregorianCalendar dt,int format);

So, dp.getFormattedDate(dp.getDate(),dp.dd_mm_yyyy); will return the selected date in the specified format.

------>
If you want the selected date with the already selected format in the datepicker object use,
	getFormattedDate();

Note: You can also achieve the same with dp.getLabel() ;

============================================================================================
As the DatePicker class extends Button you can use all the methods which apply to a Button
viz visible,enable,background,foreground,fonts,etc.
============================================================================================

14.
***************
Can change the color settings of the DatePicker Button & Calendar.
Yes try out the foll methods:

Color settings for the Button:-            
--------------------------------
	setForeground(java.awt.Color color)
	setBackground(java.awt.Color color)
	void setArrowColor(java.awt.Color color) 

Color settings for the Calendar:-            
----------------------------------
	void setCalendarBackground(java.awt.Color color) 
	void setCalendarArrowColor(java.awt.Color color) 

	 //changes color of Day,Month & year
	void setCalendarDaysColor(java.awt.Color color)
	void setCalendarMonthColor(Color color)
	void setCalendarYearColor(Color color)

	void setCalendarWeekdaysColor(java.awt.Color color) //changes color of sunday-saturday
	
	void setCalendarSelectionColor(java.awt.Color color) 


15.
***************
Can I change the height & width of the Calendar.

	No.

Although you can get the current height & width using getCalendarHeight() & getCalendarWidth()

Showing/Hiding Today & Date Range also has an affect on the height of the Calendar.

***************

16.
I am adding the date picker to the JPanel which is inside the JTabbedPane. This JTabbedPAne is sitting on
a JInternalFrame. When the JInternalFrame is open, the date picker is fine. But I tried to open another internalFrame, the date picker is visible on the second frame too.  What could be the reason.

Solution:
If you go through through the documents you will notice that DP is an AWT component, Whereas Internal Frames are SWING Component. The problem is not with DP. You will face the same problem with any AWT component.

NOTE: Swing components being Lightweight cannot overlay AWT component. The solution to this problem will be a Swing DatePIcker. 


***************

17.
why this bean was developed using awt.

We wanted that this bean should be easy to use on the net. So the jar file is just about 40 kb. If you wish to use any swing  component in your browser you will need to install an additional swing plugin which is about 5 mb. Where as an awt component doesnt need any additional plugins. Most standard browsers viz. ie & netscape directly support java awt. As we cannot assume that every person on the net has this plugin installed, we opted for awt.


But this version onwards I have also provided with the Swing Version of DatePicker ie. JDatePicker. Use JDatePicker.jar.


***************


If you have any other queries mail us at pramodjaiswal@hotmail.com,shailuash@hotmail.com


