You can use the
getInsets() method in the JFrame to find out how large the border of the JFrame is and add those values to the size you want for the inner component. This has to be done either after the component is visible, or after a call to pack(), as described here:
http://java.sun.com/j2se/1.4.2/docs/...awt/Frame.html
DaWei: I don't really see the problem. Java offers a lot of choice. If you don't like or understand what Java does , then use another language.
-Z