probleme avec alignement des composants
salut, je suis entrain d'utiliser la layout MigLayout
dans la page d'authentification , je voudrait que les champs :login ,userName_field...soient centrés mais le premier tous mes composants sont placés à partir du coint gauche à haut
comment faire pour centrer mes champs
voici mon code:
Code:
1 2 3 4 5 6 7 8
|
jContentPane = new JPanel();
jContentPane.setLayout(new MigLayout());
jContentPane.add(jLabel,"align right");
jContentPane.add(getUsername_field(),"w 100!,wrap");
jContentPane.add(password);
jContentPane.add(getPassword_field(), "w 100!,wrap");
jContentPane.add(getLogin_button(), null); |