Q:

Create first day of month from YearChooser and MonthChooser of JCalendar

I have YearChooser named yc, MonthChooser mc. I want to get values from them and create the first day of that month.
Ex: If year is 2015, month is 9, I will get the day 01/09/2015
The code:
Date d = new Date (year, month, 1);

is deprecated, and the result given wrong year (year 3125!)
How can I get my date?

A:

As per the doc

Deprecated. As of JDK version 1.1, replaced by Calendar.set(year +
1900, month, date) or GregorianCalendar(year + 1900, month, date).
Parameters:
year - the year minus 1900.
month - the month between 0-11.
date - the day of the month between 1-31.

So for year 2015 you should pass 115 as year in the Date constructor

