Controlling the size of the applet's window is important because in this version of the program the applet's components appear in what's called a FlowLayout. Under this layout, components are just placed in the applet, one after another, in a row from left to right until there's no more room in the row. Then a new row is started.
The applet tag in PetApplet.html should contain WIDTH and HEIGHT parameters, which control the initial size of the applet. By carefully setting these values, you can exert some control over the applet's layout. Try changing both of these values, one at a time, and observing the effect it has on the appearance of the applet. Through trial and error find appropriate values for the applet's size.