// There are two ways to get your constraints to the Layout. ( (GridBagLayout) ( contentPane.getLayout() ) ).setConstraints( myComponent , theConstraints ); contentPane.add ( myComponent ); // or more simply contenpane.add ( myComponent, theConstraints );