code: public void addFrame(Image frame, int duration) {
  		if (duration == 0) {
  			Log.error("Invalid duration: "+duration);
  			throw new RuntimeException("Invalid duration: "+duration);
  		}
  
  	    if (frames.isEmpty()) {
  			nextChange = (int) (duration / speed);
  		} 
  	    
  		frames.add(new Frame(frame, duration));
  		currentFrame = 0;
  	}
docs: Add animation frame to the animation
  
  @param frame The image to display for the frame
  @param duration The duration to display the frame for