If you open the JFrame API page, you'll notice that pack() is not defined in JFrame itself. Instead, if you scroll down, you see that this method is inherited from Window.
Here the exact link to the pack() method.
If the link doesn't work, replace the %28%29 in the address bar with (). Otherwise, just scroll down.
[ December 16, 2007: Message edited by: Rob Prime ]