I suggest using method reshape in class JInternalFrame.
I created a java class to test that method and it looks like it does what you want.
Note however, that I invoke that method after displaying the GUI.
Message for you sir! I think it is a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads