I'm doing a program involving Pythagorean theorem, and wanted to leave a triangle in the middle, with three JTextFields around all three sides of it. I did this, but the problem is that when I create the JTextField and add it to the desired Container, it gets huge. It is a very large white rectangle that when I click to type, a small letter comes out. So, my question is: How can I resize this JTextField to decrease it and avoid unnecessary sizes?