/** Connect the vector of QV's into the main View */ public void installQVs() { Exam thisExam = theTD.curX; Vector qv = thisExam.getListData(); for (int i = 0; i < qv.size(); i++) { // Use question number (1-origin) as string name. // System.out.println("Add question " +i +" to " + questionsPanel); questionsPanel.add(Integer.toString(i + 1), new QView((Q) qv.elementAt(i))); } myCardLayout.first(questionsPanel); }