Pour plus de clarté, voici le code en question:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Rotmentale;
/**
*
* @author Isabelle and didier
*/
import javax.swing.*;
import javax.swing.text.* ;
import java.awt.*;
import java.util.*;
public class Fconnexion extends JDialog
{
private JTextField jtextlogin;
private JPasswordField mdp;
public Fconnexion(JFrame maman,Locale loc,Client appli)
{
super(maman,true);
ResourceBundle res = ResourceBundle.getBundle("Rotmentale.traduction", loc );
super.setTitle((String)res.getObject("Fconnex_titre"));
JPanel identifier=new JPanel();
identifier.setBorder(BorderFactory.createTitledBorder((String)res.getObject("Fconnex_identifier")));
Container top = this.getContentPane();
top.setLayout(new BorderLayout());
identifier.setLayout(new GridLayout(3,2)) ;
identifier.add(new JLabel("Login :"));
jtextlogin= new JTextField(20);
identifier.add(jtextlogin);
identifier.add(new JLabel((String)res.getObject("motdepasse")));
mdp = new JPasswordField(20);
identifier.add(mdp);
JButton btvalideriden=new JButton((String)res.getObject("btConnex"));
btvalideriden.addActionListener(new ActionConnexion(1,appli,this));
identifier.add(btvalideriden);
JButton btAnnuler=new JButton((String)res.getObject("btAnnuler"));
btAnnuler.addActionListener(new ActionConnexion(2,appli,this));
identifier.add(btAnnuler);
top.add(identifier,BorderLayout.NORTH);
}
public void Demarrer()
{
this.pack();
this.setLocation(400, 300);
this.setSize(300, 130);
this.setResizable(false);
this.setVisible(true);
}
}