Change the size of a JTextField inside a JBorderLayout
From the api on GridLayout: The container is divided into equal-sized rectangles, and one component is placed in each rectangle. Try using FlowLayout or GridBagLayout for your set size to be meaningful. Also, @Serplat is correct. You need to use setPreferredSize( Dimension ) instead of setSize( int, int ).