JFrame and GLCanvas size problem!

Hi all,
I need to create a fixed-size GLCanvas and then put it on the JFrame, but i found the GLCanvas’s size does not match the JFrame’s.
For Example, my GLCanvas size is 480x320, the JFrame’s size should be larger, such as 500x360, and if it contains a menu bar, the jframe’s size would be more large.
All i want is the fixed-size GLCanvas automatically full fill the rest of the JFrame without blank area, may be this is more like a swing problem, but i really don’t know how to do it…
By the way, i am using Netbeans 6.7 Gui Builder to dev the swing app.
Thanks for your help!

set the minimum/maximum size of the canvas to your preferred value and invoke pack() on the JFrame before you make it visible. This will fix the size of the canvas and calculate a best fit size for the frame.

Hi bienator, thanks for your help, it works great!