1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| JPanel panel = new JPanel();
panel.setBackground(Color.white);
SpringLayout layout = new SpringLayout();
panel.setLayout(layout);
JLabel SMinLabel = new JLabel("SMin :");
panel.add(SMinLabel);
JTextField field1 = new JTextField();
field1.setColumns(3);
panel.add(field1);
JButton bouton = new JButton("Validée");
panel.add(bouton);
JLabel SMaxLabel = new JLabel("SMax :");
panel.add(SMaxLabel );
JTextField field2 = new JTextField();
field2.setColumns(3);
panel.add(field2);
JButton bouton2 = new JButton("Validée");
panel.add(bouton2);
SpringUtilities.makeCompactGrid(panel,
2, 3, //lignes, colonnes
5, 5, //margeX, margeY
5, 5);//spaceX, spaceY
return panel; |