i have taken two fields date of issue and date of maturity like this
try {
tDateofIssue=new JFormattedTextField(new MaskFormatter("##-##-####"));
tDateofIssue.setBounds(200,130,125,30);
c.add(tDateofIssue);
}
catch (Exception ex) {
ex.printStackTrace();
}
try {
tDateofMaturity=new JFormattedTextField(new MaskFormatter("##-##-####"));
tDateofMaturity.setBounds(200,400,125,30);
c.add(tDateofMaturity);
tDateofMaturity.addFocusListener(this);
}
catch (Exception ex) {
ex.printStackTrace();
}
and taken both the field of date/time type in database(ms access) , to retrieve date from date from database i use a method DatetoString, it is also given below
static String DateToString(Date d){
java.util.Formatter f=new java.util.Formatter();
return f.format("%td-%tm-%tY",d,d,d).toString();
}
now the problem is this i want to increment date of issue through a method so that i get date of maturity automatically, but i m unable to increment date as it is string, so plz suggest some thing