@Override
		public void itemStateChanged(ItemEvent event) {
			
			int selectedYear;
			
			if(year.getSelectedIndex() == 0)
				selectedYear = 1888;
			else
				selectedYear = Integer.parseInt(year.getSelectedItem().toString());
			
			if(month.getSelectedIndex() == 1) {
				while(day.getItemCount() != 32) {
					if(day.getItemCount() < 32)
						day.addItem(""+(day.getItemCount()));
				}
			}else if(month.getSelectedIndex() == 2) {
				if((selectedYear-1888) % 4 == 0)
					while(day.getItemCount() != 30) {
						if(day.getItemCount() < 30)
							day.addItem(""+(day.getItemCount()));
						else
							day.removeItemAt(day.getItemCount()-1);
					}
				else
					while(day.getItemCount() != 29) {
						if(day.getItemCount() < 29)
							day.addItem(""+(day.getItemCount()));
						else
							day.removeItemAt(day.getItemCount()-1);
					}
			}else if(month.getSelectedIndex() == 3) {
				while(day.getItemCount() != 32) {
					if(day.getItemCount() < 32)
						day.addItem(""+(day.getItemCount()));
				}
			}else if(month.getSelectedIndex() == 4) {
				while(day.getItemCount() != 31) {
					if(day.getItemCount() < 31)
						day.addItem(""+(day.getItemCount()));
					else 	
						day.removeItemAt(day.getItemCount()-1);
				}
			}else if(month.getSelectedIndex() == 5) {
				while(day.getItemCount() != 32) {
					if(day.getItemCount() < 32)
						day.addItem(""+(day.getItemCount()));
				}
			}else if(month.getSelectedIndex() == 6) {
				while(day.getItemCount() != 31) {
					if(day.getItemCount() < 31)
						day.addItem(""+(day.getItemCount()));
					else
						day.removeItemAt(day.getItemCount()-1);
				}
			}else if(month.getSelectedIndex() == 7) {
				while(day.getItemCount() != 32) {
					if(day.getItemCount() < 32)
						day.addItem(""+(day.getItemCount()));
				}
			}else if(month.getSelectedIndex() == 8) {
				while(day.getItemCount() != 32) {
					if(day.getItemCount() < 32)
						day.addItem(""+(day.getItemCount()));
				}
			}else if(month.getSelectedIndex() == 9) {
				while(day.getItemCount() != 31) {
					if(day.getItemCount() < 31)
						day.addItem(""+(day.getItemCount()));
					else
						day.removeItemAt(day.getItemCount()-1);
				}
			}else if(month.getSelectedIndex() == 10) {
				while(day.getItemCount() != 32) {
					if(day.getItemCount() < 32)
						day.addItem(""+(day.getItemCount()));
				}
			}else if(month.getSelectedIndex() == 11) {
				while(day.getItemCount() != 31) {
					if(day.getItemCount() < 31)
						day.addItem(""+(day.getItemCount()));
					else
						day.removeItemAt(day.getItemCount()-1);
				}
			}else if(month.getSelectedIndex() == 12) {
				while(day.getItemCount() != 32) {
					if(day.getItemCount() < 32)
						day.addItem(""+(day.getItemCount()));
				}
			}
		}