You will notice that it actually takes some extra lines of code to facilitate the division of the original applet into three separate classes. This is because each class must have some sort of a connection to the applet class in order for communication between them to occur. Most of these lines are fairly easy to understand, but the line
KB = new KB_peaks2(this);