Advertisement
Guest User

Untitled

a guest
Apr 14th, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.60 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package com.usthb.modeles;
  7.  
  8. import java.awt.Color;
  9.  
  10. /**
  11. *
  12. * @author ITEC
  13. */
  14. public class InscriptionFen extends javax.swing.JFrame {
  15.  
  16. /**
  17. * Creates new form InscriptionFen
  18. */
  19. public InscriptionFen() {
  20. initComponents();
  21. }
  22.  
  23. /**
  24. * This method is called from within the constructor to initialize the form.
  25. * WARNING: Do NOT modify this code. The content of this method is always
  26. * regenerated by the Form Editor.
  27. */
  28.  
  29. // <editor-fold defaultstate="collapsed" desc="Generated Code">
  30. private void initComponents() {
  31.  
  32. buttonGroup1 = new javax.swing.ButtonGroup();
  33. jPanel1 = new javax.swing.JPanel();
  34. txtPrenom = new javax.swing.JTextField();
  35. txtFonction = new javax.swing.JTextField();
  36. txtSpecialite = new javax.swing.JTextField();
  37. categorieH = new javax.swing.JRadioButton();
  38. categorieF = new javax.swing.JRadioButton();
  39. txtNiveauEtude = new javax.swing.JTextField();
  40. jPanel2 = new javax.swing.JPanel();
  41. jLabel2 = new javax.swing.JLabel();
  42. spUsername = new javax.swing.JSeparator();
  43. txtUsername = new javax.swing.JTextField();
  44. spPassword = new javax.swing.JSeparator();
  45. spPasswordBis = new javax.swing.JSeparator();
  46. txtPasswordBis = new javax.swing.JPasswordField();
  47. txtPassword = new javax.swing.JPasswordField();
  48. lblPasswordBis = new javax.swing.JLabel();
  49. lblUsername = new javax.swing.JLabel();
  50. lblPassword = new javax.swing.JLabel();
  51. jLabel5 = new javax.swing.JLabel();
  52. jSeparator1 = new javax.swing.JSeparator();
  53. jPanel3 = new javax.swing.JPanel();
  54. btnInscrire = new javax.swing.JLabel();
  55. jLabel3 = new javax.swing.JLabel();
  56. jLabel4 = new javax.swing.JLabel();
  57. jLabel6 = new javax.swing.JLabel();
  58. jLabel7 = new javax.swing.JLabel();
  59. jLabel8 = new javax.swing.JLabel();
  60. msgErreur1 = new javax.swing.JLabel();
  61. jLabel10 = new javax.swing.JLabel();
  62. jLabel11 = new javax.swing.JLabel();
  63. jLabel12 = new javax.swing.JLabel();
  64. jLabel13 = new javax.swing.JLabel();
  65. jLabel14 = new javax.swing.JLabel();
  66. jLabel15 = new javax.swing.JLabel();
  67. txtNom = new javax.swing.JTextField();
  68. txtCategorie = new javax.swing.JLabel();
  69. jLabel1 = new javax.swing.JLabel();
  70. mdpBisF = new javax.swing.JLabel();
  71. nomF = new javax.swing.JLabel();
  72. prenomF = new javax.swing.JLabel();
  73. catF = new javax.swing.JLabel();
  74. dateF = new javax.swing.JLabel();
  75. userF = new javax.swing.JLabel();
  76. mdpF = new javax.swing.JLabel();
  77. dateNaissance = new com.toedter.calendar.JDateChooser();
  78.  
  79. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  80. setTitle("Inscription");
  81. getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
  82.  
  83. jPanel1.setBackground(new java.awt.Color(51, 51, 60));
  84. jPanel1.setForeground(new java.awt.Color(204, 204, 204));
  85. jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
  86.  
  87. txtPrenom.setBackground(new java.awt.Color(51, 51, 60));
  88. txtPrenom.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  89. txtPrenom.setForeground(new java.awt.Color(204, 204, 204));
  90. txtPrenom.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Prénom*", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 0, 14), new java.awt.Color(204, 204, 204))); // NOI18N
  91. txtPrenom.addMouseListener(new java.awt.event.MouseAdapter() {
  92. public void mouseClicked(java.awt.event.MouseEvent evt) {
  93. txtPrenomMouseClicked(evt);
  94. }
  95. });
  96. txtPrenom.addActionListener(new java.awt.event.ActionListener() {
  97. public void actionPerformed(java.awt.event.ActionEvent evt) {
  98. txtPrenomActionPerformed(evt);
  99. }
  100. });
  101. jPanel1.add(txtPrenom, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 80, 220, 50));
  102.  
  103. txtFonction.setBackground(new java.awt.Color(51, 51, 60));
  104. txtFonction.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  105. txtFonction.setForeground(new java.awt.Color(204, 204, 204));
  106. txtFonction.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Fonction", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 0, 14), new java.awt.Color(204, 204, 204))); // NOI18N
  107. txtFonction.addMouseListener(new java.awt.event.MouseAdapter() {
  108. public void mouseClicked(java.awt.event.MouseEvent evt) {
  109. txtFonctionMouseClicked(evt);
  110. }
  111. });
  112. txtFonction.addActionListener(new java.awt.event.ActionListener() {
  113. public void actionPerformed(java.awt.event.ActionEvent evt) {
  114. txtFonctionActionPerformed(evt);
  115. }
  116. });
  117. jPanel1.add(txtFonction, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 300, 220, 50));
  118.  
  119. txtSpecialite.setBackground(new java.awt.Color(51, 51, 60));
  120. txtSpecialite.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  121. txtSpecialite.setForeground(new java.awt.Color(204, 204, 204));
  122. txtSpecialite.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Spécialité", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 0, 14), new java.awt.Color(204, 204, 204))); // NOI18N
  123. txtSpecialite.addMouseListener(new java.awt.event.MouseAdapter() {
  124. public void mouseClicked(java.awt.event.MouseEvent evt) {
  125. txtSpecialiteMouseClicked(evt);
  126. }
  127. });
  128. txtSpecialite.addActionListener(new java.awt.event.ActionListener() {
  129. public void actionPerformed(java.awt.event.ActionEvent evt) {
  130. txtSpecialiteActionPerformed(evt);
  131. }
  132. });
  133. jPanel1.add(txtSpecialite, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 360, 220, 50));
  134.  
  135. categorieH.setBackground(new java.awt.Color(51, 51, 60));
  136. buttonGroup1.add(categorieH);
  137. categorieH.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
  138. categorieH.setForeground(new java.awt.Color(204, 204, 204));
  139. categorieH.setText("Homme");
  140. jPanel1.add(categorieH, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 170, -1, -1));
  141.  
  142. categorieF.setBackground(new java.awt.Color(51, 51, 60));
  143. buttonGroup1.add(categorieF);
  144. categorieF.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
  145. categorieF.setForeground(new java.awt.Color(204, 204, 204));
  146. categorieF.setText("Femme");
  147. jPanel1.add(categorieF, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 170, -1, -1));
  148.  
  149. txtNiveauEtude.setBackground(new java.awt.Color(51, 51, 60));
  150. txtNiveauEtude.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  151. txtNiveauEtude.setForeground(new java.awt.Color(204, 204, 204));
  152. txtNiveauEtude.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Niveau d'étude", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 0, 14), new java.awt.Color(204, 204, 204))); // NOI18N
  153. txtNiveauEtude.addMouseListener(new java.awt.event.MouseAdapter() {
  154. public void mouseClicked(java.awt.event.MouseEvent evt) {
  155. txtNiveauEtudeMouseClicked(evt);
  156. }
  157. });
  158. txtNiveauEtude.addActionListener(new java.awt.event.ActionListener() {
  159. public void actionPerformed(java.awt.event.ActionEvent evt) {
  160. txtNiveauEtudeActionPerformed(evt);
  161. }
  162. });
  163. jPanel1.add(txtNiveauEtude, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 420, 220, 50));
  164.  
  165. jPanel2.setBackground(new java.awt.Color(153, 153, 153));
  166. jPanel2.setForeground(new java.awt.Color(255, 255, 255));
  167. jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
  168.  
  169. jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 24)); // NOI18N
  170. jLabel2.setForeground(new java.awt.Color(102, 102, 102));
  171. jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/icons8_Back_32px.png"))); // NOI18N
  172. jLabel2.setText("Précédent");
  173. jLabel2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
  174. jLabel2.addMouseListener(new java.awt.event.MouseAdapter() {
  175. public void mouseClicked(java.awt.event.MouseEvent evt) {
  176. jLabel2MouseClicked(evt);
  177. }
  178. });
  179. jPanel2.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 10, 200, 40));
  180.  
  181. jPanel1.add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 240, 520));
  182. jPanel1.add(spUsername, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 90, 220, 10));
  183.  
  184. txtUsername.setBackground(new java.awt.Color(51, 51, 60));
  185. txtUsername.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  186. txtUsername.setForeground(new java.awt.Color(204, 204, 204));
  187. txtUsername.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, java.awt.Color.darkGray, java.awt.Color.darkGray, new java.awt.Color(51, 51, 51), java.awt.Color.darkGray));
  188. txtUsername.addMouseListener(new java.awt.event.MouseAdapter() {
  189. public void mouseClicked(java.awt.event.MouseEvent evt) {
  190. txtUsernameMouseClicked(evt);
  191. }
  192. public void mouseExited(java.awt.event.MouseEvent evt) {
  193. txtUsernameMouseExited(evt);
  194. }
  195. public void mouseReleased(java.awt.event.MouseEvent evt) {
  196. txtUsernameMouseReleased(evt);
  197. }
  198. });
  199. jPanel1.add(txtUsername, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 60, 220, 30));
  200. jPanel1.add(spPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 190, 220, 10));
  201. jPanel1.add(spPasswordBis, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 300, 220, 10));
  202.  
  203. txtPasswordBis.setBackground(new java.awt.Color(51, 51, 60));
  204. txtPasswordBis.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  205. txtPasswordBis.setForeground(new java.awt.Color(204, 204, 204));
  206. txtPasswordBis.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, java.awt.Color.darkGray, java.awt.Color.darkGray, java.awt.Color.darkGray, java.awt.Color.darkGray));
  207. txtPasswordBis.addMouseListener(new java.awt.event.MouseAdapter() {
  208. public void mouseClicked(java.awt.event.MouseEvent evt) {
  209. txtPasswordBisMouseClicked(evt);
  210. }
  211. });
  212. txtPasswordBis.addActionListener(new java.awt.event.ActionListener() {
  213. public void actionPerformed(java.awt.event.ActionEvent evt) {
  214. txtPasswordBisActionPerformed(evt);
  215. }
  216. });
  217. jPanel1.add(txtPasswordBis, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 270, 220, 30));
  218.  
  219. txtPassword.setBackground(new java.awt.Color(51, 51, 60));
  220. txtPassword.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  221. txtPassword.setForeground(new java.awt.Color(204, 204, 204));
  222. txtPassword.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, java.awt.Color.darkGray, java.awt.Color.darkGray, java.awt.Color.darkGray, java.awt.Color.darkGray));
  223. txtPassword.addMouseListener(new java.awt.event.MouseAdapter() {
  224. public void mouseClicked(java.awt.event.MouseEvent evt) {
  225. txtPasswordMouseClicked(evt);
  226. }
  227. });
  228. txtPassword.addActionListener(new java.awt.event.ActionListener() {
  229. public void actionPerformed(java.awt.event.ActionEvent evt) {
  230. txtPasswordActionPerformed(evt);
  231. }
  232. });
  233. jPanel1.add(txtPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 160, 220, 30));
  234.  
  235. lblPasswordBis.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  236. lblPasswordBis.setForeground(new java.awt.Color(204, 204, 204));
  237. lblPasswordBis.setText("Confirmer mot de passe*");
  238. jPanel1.add(lblPasswordBis, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 230, 220, 30));
  239.  
  240. lblUsername.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  241. lblUsername.setForeground(new java.awt.Color(204, 204, 204));
  242. lblUsername.setText("Nom d'utilisateur*");
  243. jPanel1.add(lblUsername, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 30, 220, 30));
  244.  
  245. lblPassword.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  246. lblPassword.setForeground(new java.awt.Color(204, 204, 204));
  247. lblPassword.setText("Mot de passe*");
  248. jPanel1.add(lblPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 130, 220, 30));
  249.  
  250. jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
  251. jLabel5.setForeground(new java.awt.Color(153, 153, 153));
  252. jLabel5.setText("(*) Champs Obligatoires");
  253. jPanel1.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 480, 160, -1));
  254.  
  255. jSeparator1.setForeground(new java.awt.Color(153, 153, 153));
  256. jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
  257. jPanel1.add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 30, 10, 430));
  258.  
  259. jPanel3.setBackground(new java.awt.Color(153, 153, 153));
  260. jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
  261.  
  262. btnInscrire.setFont(new java.awt.Font("Century Gothic", 0, 24)); // NOI18N
  263. btnInscrire.setForeground(new java.awt.Color(51, 51, 51));
  264. btnInscrire.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  265. btnInscrire.setText("S'inscrire");
  266. btnInscrire.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
  267. btnInscrire.addMouseListener(new java.awt.event.MouseAdapter() {
  268. public void mouseClicked(java.awt.event.MouseEvent evt) {
  269. btnInscrireMouseClicked(evt);
  270. }
  271. });
  272. jPanel3.add(btnInscrire, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 230, 50));
  273.  
  274. jPanel1.add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 410, 230, 50));
  275.  
  276. jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  277. jLabel3.setForeground(new java.awt.Color(255, 0, 0));
  278. jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 330, 220, 20));
  279.  
  280. jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  281. jLabel4.setForeground(new java.awt.Color(255, 0, 0));
  282. jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 330, 220, 20));
  283.  
  284. jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  285. jLabel6.setForeground(new java.awt.Color(255, 0, 0));
  286. jPanel1.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 330, 220, 20));
  287.  
  288. jLabel7.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  289. jLabel7.setForeground(new java.awt.Color(255, 0, 0));
  290. jPanel1.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 330, 220, 20));
  291.  
  292. jLabel8.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  293. jLabel8.setForeground(new java.awt.Color(255, 0, 0));
  294. jPanel1.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 330, 220, 20));
  295.  
  296. msgErreur1.setBackground(new java.awt.Color(51, 51, 60));
  297. msgErreur1.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  298. msgErreur1.setForeground(new java.awt.Color(255, 0, 0));
  299. jPanel1.add(msgErreur1, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 360, 240, 20));
  300.  
  301. jLabel10.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  302. jLabel10.setForeground(new java.awt.Color(255, 0, 0));
  303. jPanel1.add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 360, 220, 20));
  304.  
  305. jLabel11.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  306. jLabel11.setForeground(new java.awt.Color(255, 0, 0));
  307. jPanel1.add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 360, 220, 20));
  308.  
  309. jLabel12.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  310. jLabel12.setForeground(new java.awt.Color(255, 0, 0));
  311. jPanel1.add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 360, 220, 20));
  312.  
  313. jLabel13.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  314. jLabel13.setForeground(new java.awt.Color(255, 0, 0));
  315. jPanel1.add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 360, 220, 20));
  316.  
  317. jLabel14.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  318. jLabel14.setForeground(new java.awt.Color(255, 0, 0));
  319. jPanel1.add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 360, 220, 20));
  320.  
  321. jLabel15.setBackground(new java.awt.Color(51, 51, 60));
  322. jLabel15.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  323. jLabel15.setForeground(new java.awt.Color(255, 0, 0));
  324. jPanel1.add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 360, 220, 20));
  325.  
  326. txtNom.setBackground(new java.awt.Color(51, 51, 60));
  327. txtNom.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
  328. txtNom.setForeground(new java.awt.Color(204, 204, 204));
  329. txtNom.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Nom*", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 0, 14), new java.awt.Color(204, 204, 204))); // NOI18N
  330. txtNom.addMouseListener(new java.awt.event.MouseAdapter() {
  331. public void mouseClicked(java.awt.event.MouseEvent evt) {
  332. txtNomMouseClicked(evt);
  333. }
  334. });
  335. jPanel1.add(txtNom, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 20, 220, 50));
  336.  
  337. txtCategorie.setBackground(new java.awt.Color(51, 51, 60));
  338. txtCategorie.setForeground(new java.awt.Color(204, 204, 204));
  339. txtCategorie.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Catégorie*", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 0, 14), new java.awt.Color(204, 204, 204))); // NOI18N
  340. jPanel1.add(txtCategorie, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 140, 220, 70));
  341.  
  342. jLabel1.setBackground(new java.awt.Color(51, 51, 60));
  343. jLabel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Date de naissance*", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 0, 14), new java.awt.Color(204, 204, 204))); // NOI18N
  344. jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 220, 220, 70));
  345.  
  346. mdpBisF.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
  347. mdpBisF.setForeground(new java.awt.Color(255, 0, 0));
  348. jPanel1.add(mdpBisF, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 270, 20, 30));
  349.  
  350. nomF.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
  351. nomF.setForeground(new java.awt.Color(255, 0, 0));
  352. jPanel1.add(nomF, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 30, 20, 30));
  353.  
  354. prenomF.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
  355. prenomF.setForeground(new java.awt.Color(255, 0, 0));
  356. jPanel1.add(prenomF, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 90, 20, 30));
  357.  
  358. catF.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
  359. catF.setForeground(new java.awt.Color(255, 0, 0));
  360. jPanel1.add(catF, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 170, 20, 30));
  361.  
  362. dateF.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
  363. dateF.setForeground(new java.awt.Color(255, 0, 0));
  364. jPanel1.add(dateF, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 240, 20, 30));
  365.  
  366. userF.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
  367. userF.setForeground(new java.awt.Color(255, 0, 0));
  368. jPanel1.add(userF, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 60, 20, 30));
  369.  
  370. mdpF.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
  371. mdpF.setForeground(new java.awt.Color(255, 0, 0));
  372. jPanel1.add(mdpF, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 160, 20, 30));
  373.  
  374. dateNaissance.setMaxSelectableDate(new java.util.Date(1104537661000L));
  375. dateNaissance.setMinSelectableDate(new java.util.Date(-1640992355000L));
  376. jPanel1.add(dateNaissance, new org.netbeans.lib.awtextra.AbsoluteConstraints(277, 250, 190, -1));
  377.  
  378. getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 850, 520));
  379.  
  380. pack();
  381. }// </editor-fold>
  382.  
  383. private void txtFonctionActionPerformed(java.awt.event.ActionEvent evt) {
  384. // TODO add your handling code here:
  385. }
  386.  
  387. private void txtSpecialiteActionPerformed(java.awt.event.ActionEvent evt) {
  388. // TODO add your handling code here:
  389. }
  390.  
  391. private void txtNiveauEtudeActionPerformed(java.awt.event.ActionEvent evt) {
  392. // TODO add your handling code here:
  393. }
  394.  
  395. private void txtPrenomMouseClicked(java.awt.event.MouseEvent evt) {
  396. txtPrenom.setText("");
  397. }
  398.  
  399. private void txtFonctionMouseClicked(java.awt.event.MouseEvent evt) {
  400. txtFonction.setText("");
  401. }
  402.  
  403. private void txtSpecialiteMouseClicked(java.awt.event.MouseEvent evt) {
  404. txtSpecialite.setText("");
  405. }
  406.  
  407. private void txtNiveauEtudeMouseClicked(java.awt.event.MouseEvent evt) {
  408. txtNiveauEtude.setText("");
  409. }
  410.  
  411. private void txtUsernameMouseClicked(java.awt.event.MouseEvent evt) {
  412.  
  413. }
  414.  
  415. private void txtPasswordBisActionPerformed(java.awt.event.ActionEvent evt) {
  416. // TODO add your handling code here:
  417. }
  418.  
  419. private void txtPasswordActionPerformed(java.awt.event.ActionEvent evt) {
  420. // TODO add your handling code here:
  421. }
  422.  
  423. private void txtPasswordMouseClicked(java.awt.event.MouseEvent evt) {
  424. txtPassword.setText("");
  425. }
  426.  
  427. private void txtPasswordBisMouseClicked(java.awt.event.MouseEvent evt) {
  428. txtPasswordBis.setText("");
  429. }
  430.  
  431. private void jLabel2MouseClicked(java.awt.event.MouseEvent evt) {
  432. this.dispose();
  433. new ConnexionFen().setVisible(true);
  434. }
  435.  
  436. private void txtUsernameMouseReleased(java.awt.event.MouseEvent evt) {
  437. // TODO add your handling code here:
  438. }
  439.  
  440. private void txtUsernameMouseExited(java.awt.event.MouseEvent evt) {
  441. // TODO add your handling code here:
  442. }
  443.  
  444. private void btnInscrireMouseClicked(java.awt.event.MouseEvent evt) {
  445. String nom=new String(txtNom.getText()),
  446. prenom= new String(txtPrenom.getText()),
  447. username= new String(txtUsername.getText()),
  448. password=new String(txtPassword.getPassword()),
  449. passwordBis=new String(txtPasswordBis.getPassword());
  450. String fonction=txtFonction.getText();
  451. String specialite=txtSpecialite.getText();
  452. String niveauEtude=txtNiveauEtude.getText();
  453. String date="";
  454. if(dateNaissance.getDate()!=null)
  455. date = new String(dateNaissance.getDate().toString().substring(4,10)+dateNaissance.getDate().toString().substring(23));
  456. String categorie="";
  457. if(categorieH.isSelected())
  458. categorie="Homme";
  459. else
  460. if(categorieF.isSelected())
  461. categorie="Femme";
  462.  
  463.  
  464. if(nom.isEmpty() || prenom.isEmpty() || username.isEmpty()
  465. || password.isEmpty() || passwordBis.isEmpty() || categorie.isEmpty() || date.isEmpty())
  466. {
  467.  
  468. msgErreur1.setText("Remplissez les champs obligatoires");
  469.  
  470. if(nom.isEmpty())
  471. // txtPrenom.setForeground(Color.RED);
  472. nomF.setText("*");
  473. else
  474. // txtPrenom.setForeground(Color.LIGHT_GRAY);
  475. nomF.setText("");
  476.  
  477. if(prenom.isEmpty())
  478. //txtPrenom.setForeground(Color.RED);
  479. prenomF.setText("*");
  480. else
  481. //txtPrenom.setForeground(Color.LIGHT_GRAY);
  482. prenomF.setText("");
  483.  
  484. if(username.isEmpty())
  485. //lblUsername.setForeground(Color.RED);
  486. userF.setText("*");
  487. else
  488. //lblUsername.setForeground(Color.LIGHT_GRAY);
  489. userF.setText("");
  490.  
  491. if(password.isEmpty())
  492. //lblPassword.setForeground(Color.RED);
  493. mdpF.setText("*");
  494. else
  495. //lblPassword.setForeground(Color.LIGHT_GRAY);
  496. mdpF.setText("");
  497.  
  498. if(passwordBis.isEmpty())
  499. //lblPasswordBis.setForeground(Color.RED);
  500. mdpBisF.setText("*");
  501. else
  502. //lblPasswordBis.setForeground(Color.LIGHT_GRAY);
  503. mdpBisF.setText("");
  504.  
  505. if(categorie.isEmpty())
  506. catF.setText("*");
  507. else
  508. catF.setText("");
  509.  
  510. if(date.isEmpty())
  511. dateF.setText("*");
  512. else
  513. dateF.setText("");
  514.  
  515.  
  516. }else{
  517. if(!password.equals(passwordBis)){
  518. msgErreur1.setText("Mots de passe différents");
  519. }else{
  520.  
  521. if(ServeurMiniFacebook.userExiste(username)){
  522.  
  523. if(ServeurMiniFacebook.userExiste(username))
  524. msgErreur1.setText("Nom d'uilisateur déjà utilisé");
  525. else
  526. msgErreur1.setText("");
  527. }
  528. else{
  529. //sous condition
  530. ServeurMiniFacebook.inscrireAbonne(new Abonne(nom,prenom,date,
  531. categorie ,username,password,txtFonction.getText(),
  532. txtSpecialite.getText(),txtNiveauEtude.getText()));
  533. this.dispose();}
  534. }
  535.  
  536. }
  537.  
  538. }
  539. private void txtNomMouseClicked(java.awt.event.MouseEvent evt) {
  540. // TODO add your handling code here:
  541. }
  542.  
  543. private void txtPrenomActionPerformed(java.awt.event.ActionEvent evt) {
  544. // TODO add your handling code here:
  545. }
  546.  
  547. /**
  548. * @param args the command line arguments
  549. *//*
  550. public static void main(String args[]) {
  551. /* Set the Nimbus look and feel */
  552. //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  553. /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  554. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  555. */
  556. /* try {
  557. for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
  558. if ("Nimbus".equals(info.getName())) {
  559. javax.swing.UIManager.setLookAndFeel(info.getClassName());
  560. break;
  561. }
  562. }
  563. } catch (ClassNotFoundException ex) {
  564. java.util.logging.Logger.getLogger(InscriptionFen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  565. } catch (InstantiationException ex) {
  566. java.util.logging.Logger.getLogger(InscriptionFen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  567. } catch (IllegalAccessException ex) {
  568. java.util.logging.Logger.getLogger(InscriptionFen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  569. } catch (javax.swing.UnsupportedLookAndFeelException ex) {
  570. java.util.logging.Logger.getLogger(InscriptionFen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  571. }
  572. //</editor-fold>*/
  573.  
  574.  
  575.  
  576. // Variables declaration - do not modify
  577. private javax.swing.JLabel btnInscrire;
  578. private javax.swing.ButtonGroup buttonGroup1;
  579. private javax.swing.JLabel catF;
  580. private javax.swing.JRadioButton categorieF;
  581. private javax.swing.JRadioButton categorieH;
  582. private javax.swing.JLabel dateF;
  583. private com.toedter.calendar.JDateChooser dateNaissance;
  584. private javax.swing.JLabel jLabel1;
  585. private javax.swing.JLabel jLabel10;
  586. private javax.swing.JLabel jLabel11;
  587. private javax.swing.JLabel jLabel12;
  588. private javax.swing.JLabel jLabel13;
  589. private javax.swing.JLabel jLabel14;
  590. private javax.swing.JLabel jLabel15;
  591. private javax.swing.JLabel jLabel2;
  592. private javax.swing.JLabel jLabel3;
  593. private javax.swing.JLabel jLabel4;
  594. private javax.swing.JLabel jLabel5;
  595. private javax.swing.JLabel jLabel6;
  596. private javax.swing.JLabel jLabel7;
  597. private javax.swing.JLabel jLabel8;
  598. private javax.swing.JPanel jPanel1;
  599. private javax.swing.JPanel jPanel2;
  600. private javax.swing.JPanel jPanel3;
  601. private javax.swing.JSeparator jSeparator1;
  602. private javax.swing.JLabel lblPassword;
  603. private javax.swing.JLabel lblPasswordBis;
  604. private javax.swing.JLabel lblUsername;
  605. private javax.swing.JLabel mdpBisF;
  606. private javax.swing.JLabel mdpF;
  607. private javax.swing.JLabel msgErreur1;
  608. private javax.swing.JLabel nomF;
  609. private javax.swing.JLabel prenomF;
  610. private javax.swing.JSeparator spPassword;
  611. private javax.swing.JSeparator spPasswordBis;
  612. private javax.swing.JSeparator spUsername;
  613. private javax.swing.JLabel txtCategorie;
  614. private javax.swing.JTextField txtFonction;
  615. private javax.swing.JTextField txtNiveauEtude;
  616. private javax.swing.JTextField txtNom;
  617. private javax.swing.JPasswordField txtPassword;
  618. private javax.swing.JPasswordField txtPasswordBis;
  619. private javax.swing.JTextField txtPrenom;
  620. private javax.swing.JTextField txtSpecialite;
  621. private javax.swing.JTextField txtUsername;
  622. private javax.swing.JLabel userF;
  623. // End of variables declaration
  624.  
  625. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement