If by too thick you mean too high, maybe you need to look at which layout manager you're using.
By default the layout manager for a JPanel is FlowLayout which shouldn't be a problem, but if you've set it to BorderLayout and then added the JTextField to the center it will resize vertically to fill the panel.
Alternatively you can control the size of a JTextField by using the methods setMinimumSize, setPreferredSize and setMaximumSize, but using the correct layout manager is usually easier.
Regards,
Tim