repaint();
    public void display(){	int tmp = wi.getIndex();	try {	    wi.reset(); // refresh the iterator code	    wi.gotoIndex(tmp);	} catch (NoSuchElementException e) {	    // ignore	}	/* go to 1st train if current position is undefined */	if (wi.getIndex() < 0 && wi.size() > 0) {	    wi.next();	}	if (wi.getIndex() > 0) {            this.previousJButton.setEnabled(true);        } else {            this.previousJButton.setEnabled(false);        }                if (wi.getIndex() < (wi.size() - 1)) {            this.nextJButton.setEnabled(true);        } else {            this.nextJButton.setEnabled(false);        }                newTrainScheduleJPanel1.display(wi.getIndex());        trainDetailsJPanel1.displayTrain(wi.getIndex());    }