This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I realise that this is an old post, but thought I would reply anyway. Perhaps it will help someone if not the original poster. What is happening is that the JTextField is shrinking to its minimum size. My solution to this is to use setMinimumSize() and setPreferredSize() on the JTextField, using the same value for both calls and specifying the size that you want the field to be in both calls. This has solved the problem for me.