LatticeConstraints cons = new LatticeConstraints(); JButton button1 = new JButton("Button 1"); cons.x = 0; cons.y = 0; cons.width = 3; cons.height = 2; cons.fill = LatticeConstraints.BOTH; layout.setConstraints(button1, cons); container.add(button1); JButton button2 = new JButton("Button 2"); cons.x = 4; cons.y = 0; cons.width = 1; cons.height = 1; cons.adjust = LatticeConstraints.BOTH; layout.set