publicstaticDateaumenta(Datedate,intnumeroDeMeses){Calendarcalendar=Calendar.getInstance();calendar.setTime(date);calendar.add(Calendar.MONTH,numeroDeMeses);//nessa linha troca Calendar.DATE para Calendar.MONTHreturncalendar.getTime();}
Lembrando que Janeiro é 0 para Calendar.MONTH
MONTH
public static final int MONTH
Field number for get and set indicating the month. This is a calendar-specific value. The first month of the year is JANUARY which is 0; the last depends on the number of months in a year.
wanderley.drumond
Pessoal aproveitando o encejo alguém sabe como transformar isso numa String?
Quero que o resultado disso apareça dentro de um FormatetedTextField
Já tentei fazer cast e não funcionou. toString tbm dá erro…