public void actionPerformed(ActionEvent e) { int i = dance.getBeat(beatCount); if (i > 0) beat[i].play(); students.makeNextStep(); beatCount++; }