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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
| /*
* CFCréerProfil.java
*
* Created on 12 février 2009, 21:27
*/
package PFiches;
/**
*
* @author Fanny
*/
public class CFCréerProfil extends javax.swing.JDialog {
/** Creates new form CFCréerProfil */
public CFCréerProfil(java.awt.Frame parent, boolean modal) {
super(parent, modal);
initComponents();
}
//public String get_id(){
//String id;
//id=tfIdentifiant.getString();
//return(id);
//}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
ltitre = new javax.swing.JLabel();
lIdentifiant = new javax.swing.JLabel();
lMotdePasse = new javax.swing.JLabel();
tfIdentifiant = new javax.swing.JTextField();
bVérifId = new javax.swing.JButton();
pfMotdePasse = new javax.swing.JPasswordField();
bCréer = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Création d'un profil");
ltitre.setFont(new java.awt.Font("Tahoma", 0, 18));
ltitre.setText("Création d'un profil");
lIdentifiant.setText("Entrez votre identifiant :");
lMotdePasse.setText("Entrez votre mot de passe :");
tfIdentifiant.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
tfIdentifiantActionPerformed(evt);
}
});
bVérifId.setText("Vérifier la disponibilité");
bVérifId.setToolTipText("Vérifier si l'identifiant proposé est disponible");
bVérifId.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bVérifIdActionPerformed(evt);
}
});
bCréer.setText("Créer");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(122, 122, 122)
.addComponent(ltitre))
.addGroup(layout.createSequentialGroup()
.addGap(27, 27, 27)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lMotdePasse)
.addComponent(lIdentifiant)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(pfMotdePasse, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(tfIdentifiant, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE))
.addGap(54, 54, 54)
.addComponent(bVérifId))))
.addGroup(layout.createSequentialGroup()
.addGap(169, 169, 169)
.addComponent(bCréer)))
.addContainerGap(30, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(ltitre)
.addGap(31, 31, 31)
.addComponent(lIdentifiant)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(tfIdentifiant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(bVérifId))
.addGap(40, 40, 40)
.addComponent(lMotdePasse)
.addGap(18, 18, 18)
.addComponent(pfMotdePasse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)
.addComponent(bCréer)
.addGap(31, 31, 31))
);
pack();
}// </editor-fold>
private void tfIdentifiantActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void bVérifIdActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
static public String getidentifiant(){
String id;
id=tfIdentifiant.getText();
return(id);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
CFCréerProfil dialog = new CFCréerProfil(new javax.swing.JFrame(), true);
dialog.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
System.exit(0);
}
});
dialog.setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton bCréer;
private javax.swing.JButton bVérifId;
private javax.swing.JLabel lIdentifiant;
private javax.swing.JLabel lMotdePasse;
private javax.swing.JLabel ltitre;
private javax.swing.JPasswordField pfMotdePasse;
private javax.swing.JTextField tfIdentifiant;
// End of variables declaration
} |
Partager