public boolean action(Event e, Object o) { if (e.target == nextButton) { calculator.set(yourBiorhythm.getCalcYear(), yourBiorhythm.getCalcMonth(), yourBiorhythm.getCalcDate()); long pastDays = calculator.getPastDays(); calculator.setPastDays(pastDays + 1); yourBiorhythm.setCalculateDay(calculator.getYear(), calculator.getMonth(), calculator.getDate()); biorhythmCanvas.repaint(); return true; } else if (e.target == prevButton) { calculator.set(yourBiorhythm.getCalcYear(), yourBiorhythm.getCalcMonth(), yourBiorhythm.getCalcDate()); long pastDays = calculator.getPastDays(); calculator.setPastDays(pastDays - 1); yourBiorhythm.setCalculateDay(calculator.getYear(), calculator.getMonth(), calculator.getDate()); biorhythmCanvas.repaint(); return true; } else if (e.target == setButton) { setDaysFrame.show(); setDaysFrame.repaint(); return true; } return false; }