@@ -54,13 +54,13 @@ public Boolean emprunter(pret pr) {
5454 OXML .setStatut (OXML .get (pr .getIdoeuvre ()), "non disponible" );
5555 return true ;
5656 } else {
57- System .out .println ("Impossible d'emprunter !" );
57+ System .out .println ("Impossible to lend !" );
5858 return false ;
5959 }
6060 }
6161
6262 public void eventB1 () {
63- int choice = JOptionPane .showOptionDialog (null , "Choisissez une option :" , "Ajouter ou Supprimer ?" , JOptionPane .DEFAULT_OPTION , JOptionPane .PLAIN_MESSAGE , null , new Object []{"Ajouter une oeuvre " , "Supprimer une oeuvre " }, null );
63+ int choice = JOptionPane .showOptionDialog (null , "Choose an option :" , "Add or Remove ?" , JOptionPane .DEFAULT_OPTION , JOptionPane .PLAIN_MESSAGE , null , new Object []{"Add a book " , "Delete a book " }, null );
6464 if (choice == 0 ) {
6565 JPanel dialogPanel = new JPanel (new GridLayout (0 , 2 ));
6666 JTextField idField = new JTextField ();
@@ -72,42 +72,42 @@ public void eventB1() {
7272 JTextField statusField = new JTextField ();
7373 dialogPanel .add (new JLabel ("ID :" ));
7474 dialogPanel .add (idField );
75- dialogPanel .add (new JLabel ("Titre :" ));
75+ dialogPanel .add (new JLabel ("Title :" ));
7676 dialogPanel .add (titleField );
77- dialogPanel .add (new JLabel ("Categorie :" ));
77+ dialogPanel .add (new JLabel ("Category :" ));
7878 dialogPanel .add (categoryField );
79- dialogPanel .add (new JLabel ("Auteur :" ));
79+ dialogPanel .add (new JLabel ("Author :" ));
8080 dialogPanel .add (authorField );
81- dialogPanel .add (new JLabel ("Editeur :" ));
81+ dialogPanel .add (new JLabel ("Publisher :" ));
8282 dialogPanel .add (publisherField );
83- dialogPanel .add (new JLabel ("Annee de sortie :" ));
83+ dialogPanel .add (new JLabel ("Release date :" ));
8484 dialogPanel .add (launchDateField );
85- dialogPanel .add (new JLabel ("Statut :" ));
85+ dialogPanel .add (new JLabel ("Status :" ));
8686 dialogPanel .add (statusField );
8787
88- int result = JOptionPane .showConfirmDialog (null , dialogPanel , "Ajouter une oeuvre " , JOptionPane .OK_CANCEL_OPTION );
88+ int result = JOptionPane .showConfirmDialog (null , dialogPanel , "Add a book " , JOptionPane .OK_CANCEL_OPTION );
8989 if (result == JOptionPane .OK_OPTION ) {
9090 addOeuvre (new oeuvre (Integer .parseInt (idField .getText ()), titleField .getText (), categoryField .getText (), authorField .getText (), publisherField .getText (), Integer .parseInt (launchDateField .getText ()), statusField .getText ()));
9191 System .out .println ("Added !" );
9292 }
9393 } else if (choice == 1 ) {
94- int choice1 = JOptionPane .showOptionDialog (null , "Choisissez une option :" , "Titre ou ID ?" , JOptionPane .DEFAULT_OPTION , JOptionPane .PLAIN_MESSAGE , null , new Object []{"Selection par Titre " , "Selection par ID" }, null );
94+ int choice1 = JOptionPane .showOptionDialog (null , "Choose an option :" , "Title or ID ?" , JOptionPane .DEFAULT_OPTION , JOptionPane .PLAIN_MESSAGE , null , new Object []{"Selection by Title " , "Selection by ID" }, null );
9595 if (choice1 == 0 ) {
9696 JPanel panel = new JPanel ();
97- panel .add (new JLabel ("Entrer le titre de l'oeuvre a supprimer :" ));
97+ panel .add (new JLabel ("Enter the title of the book to be deleted :" ));
9898 JTextField textField = new JTextField (20 );
9999 panel .add (textField );
100- int result = JOptionPane .showConfirmDialog (null , panel , "Titre de l'oeuvre " , JOptionPane .OK_CANCEL_OPTION );
100+ int result = JOptionPane .showConfirmDialog (null , panel , "Title of the book " , JOptionPane .OK_CANCEL_OPTION );
101101 if (result == JOptionPane .OK_OPTION ) {
102102 deleteOeuvre (new oeuvre (0 , textField .getText (), null , null , null ,0 , null ));
103103 System .out .println ("Deleted ?!" );
104104 }
105105 } else if (choice1 == 1 ) {
106106 JPanel panel = new JPanel ();
107- panel .add (new JLabel ("Entrer l' ID de l'oeuvre a supprimer :" ));
107+ panel .add (new JLabel ("Enter the ID of the book to be deleted :" ));
108108 JTextField textField = new JTextField (20 );
109109 panel .add (textField );
110- int result = JOptionPane .showConfirmDialog (null , panel , "ID de l'oeuvre " , JOptionPane .OK_CANCEL_OPTION );
110+ int result = JOptionPane .showConfirmDialog (null , panel , "ID of the book " , JOptionPane .OK_CANCEL_OPTION );
111111 if (result == JOptionPane .OK_OPTION ) {
112112 deleteOeuvre (new oeuvre (Integer .parseInt (textField .getText ()), null , null , null , null , 0 , null ));
113113 }
@@ -117,10 +117,10 @@ public void eventB1() {
117117
118118 public void eventB2 () {
119119 JPanel panel = new JPanel ();
120- panel .add (new JLabel ("Entrer l' ID ou bien le titre de l'oeuvre a chercher :" ));
120+ panel .add (new JLabel ("Enter the ID or title of the book to search for :" ));
121121 JTextField textField = new JTextField (20 );
122122 panel .add (textField );
123- int result = JOptionPane .showConfirmDialog (null , panel , "ID/Titre de l'oeuvre " , JOptionPane .OK_CANCEL_OPTION );
123+ int result = JOptionPane .showConfirmDialog (null , panel , "ID/Title of book " , JOptionPane .OK_CANCEL_OPTION );
124124 if (result == JOptionPane .OK_OPTION ) {
125125 oeuvre oeu = new oeuvre ();
126126 try {
@@ -130,27 +130,27 @@ public void eventB2() {
130130 }
131131
132132 if (oeu != null ) {
133- String message = "ID :" + oeu .getId () + "\n Categorie : " + oeu .getCategorie () + "\n Titre : " + oeu .getTitre () + "\n Editeur : " + oeu .getEditeur () + "\n Date de sortie : " + oeu .getLaunchdate () + "\n Statut : " + oeu .getStatut ();
133+ String message = "ID :" + oeu .getId () + "\n Category : " + oeu .getCategorie () + "\n Title : " + oeu .getTitre () + "\n Publisher : " + oeu .getEditeur () + "\n Release date : " + oeu .getLaunchdate () + "\n Status : " + oeu .getStatut ();
134134 JOptionPane .showMessageDialog (null , message );
135135 } else {
136- JOptionPane .showMessageDialog (null , "Introuvable " , "Error" , JOptionPane .ERROR_MESSAGE );
136+ JOptionPane .showMessageDialog (null , "Not Found ! " , "Error" , JOptionPane .ERROR_MESSAGE );
137137 }
138138 }
139139 }
140140
141141 public void eventB34 (String x ) {
142142 if (!x .equals ("*" )) {
143143 JPanel panel = new JPanel ();
144- panel .add (new JLabel ("Entrer la categorie :" ));
144+ panel .add (new JLabel ("Enter category :" ));
145145 JTextField textField = new JTextField (20 );
146146 panel .add (textField );
147- int result = JOptionPane .showConfirmDialog (null , panel , "Categorie ?" , JOptionPane .OK_CANCEL_OPTION );
147+ int result = JOptionPane .showConfirmDialog (null , panel , "Category ?" , JOptionPane .OK_CANCEL_OPTION );
148148 if (result == JOptionPane .OK_OPTION ) {
149149 x = textField .getText ();
150150 }
151151 }
152152
153- String [] columnNames = {"ID" , "Titre " , "Categorie " , "Auteur " , "Editeur " , "Date de sortie " , "Statut " };
153+ String [] columnNames = {"ID" , "Title " , "Category " , "Author " , "Publisher " , "Release date " , "Status " };
154154
155155 ArrayList <ArrayList <String >> data = OXML .print (x );
156156
@@ -172,7 +172,7 @@ public void eventB34(String x) {
172172 frame .pack ();
173173 frame .setVisible (true );
174174 } else {
175- JOptionPane .showMessageDialog (null , "Introuvable " , "Error" , JOptionPane .ERROR_MESSAGE );
175+ JOptionPane .showMessageDialog (null , "Not Found ! " , "Error" , JOptionPane .ERROR_MESSAGE );
176176 }
177177 }
178178
@@ -183,49 +183,49 @@ public void eventB5() {
183183 JTextField prenom = new JTextField ();
184184 JTextField adresse = new JTextField ();
185185 JTextField email = new JTextField ();
186- dialogPanel .add (new JLabel ("Numero d'adherent :" ));
186+ dialogPanel .add (new JLabel ("Member ID :" ));
187187 dialogPanel .add (numeroAd );
188- dialogPanel .add (new JLabel ("Nom :" ));
188+ dialogPanel .add (new JLabel ("Last name :" ));
189189 dialogPanel .add (nom );
190- dialogPanel .add (new JLabel ("Prenom :" ));
190+ dialogPanel .add (new JLabel ("First name :" ));
191191 dialogPanel .add (prenom );
192- dialogPanel .add (new JLabel ("Adresse :" ));
192+ dialogPanel .add (new JLabel ("Address :" ));
193193 dialogPanel .add (adresse );
194194 dialogPanel .add (new JLabel ("E-mail :" ));
195195 dialogPanel .add (email );
196196
197- int result = JOptionPane .showConfirmDialog (null , dialogPanel , "Ajouter un adherent " , JOptionPane .OK_CANCEL_OPTION );
197+ int result = JOptionPane .showConfirmDialog (null , dialogPanel , "Add a member " , JOptionPane .OK_CANCEL_OPTION );
198198 if (result == JOptionPane .OK_OPTION ) {
199199 addAdherent (new adherent (Integer .parseInt (numeroAd .getText ()), nom .getText (), prenom .getText (), adresse .getText (), email .getText ()));
200200 System .out .println ("Added !" );
201201 }
202202 }
203203
204204 public void eventB6 () {
205- int choice = JOptionPane .showOptionDialog (null , "Choisissez une option :" , "ID ou E-mail ?" , JOptionPane .DEFAULT_OPTION , JOptionPane .PLAIN_MESSAGE , null , new Object []{"Selection par ID" , "Selection par E-mail" }, null );
205+ int choice = JOptionPane .showOptionDialog (null , "Choose an option :" , "ID or E-mail ?" , JOptionPane .DEFAULT_OPTION , JOptionPane .PLAIN_MESSAGE , null , new Object []{"Selection by ID" , "Selection by E-mail" }, null );
206206 if (choice == 0 ) {
207207 JPanel panel = new JPanel ();
208- panel .add (new JLabel ("Entrer l' ID de l'adherent a supprimer :" ));
208+ panel .add (new JLabel ("Enter the ID of the member to be deleted :" ));
209209 JTextField textField = new JTextField (20 );
210210 panel .add (textField );
211- int result = JOptionPane .showConfirmDialog (null , panel , "ID de l'adherent " , JOptionPane .OK_CANCEL_OPTION );
211+ int result = JOptionPane .showConfirmDialog (null , panel , "Member ID " , JOptionPane .OK_CANCEL_OPTION );
212212 if (result == JOptionPane .OK_OPTION ) {
213213 deleteAdherent (new adherent (Integer .parseInt (textField .getText ()), null , null , null , null ));
214214 }
215215 } else if (choice == 1 ) {
216216 JPanel panel = new JPanel ();
217- panel .add (new JLabel ("Entrer l' e-mail de l'adherent a supprimer :" ));
217+ panel .add (new JLabel ("Enter the e-mail address of the member to be deleted :" ));
218218 JTextField textField = new JTextField (20 );
219219 panel .add (textField );
220- int result = JOptionPane .showConfirmDialog (null , panel , "ID de l'oeuvre " , JOptionPane .OK_CANCEL_OPTION );
220+ int result = JOptionPane .showConfirmDialog (null , panel , "Book ID " , JOptionPane .OK_CANCEL_OPTION );
221221 if (result == JOptionPane .OK_OPTION ) {
222222 deleteAdherent (new adherent (0 , null , null , null , textField .getText ()));
223223 }
224224 }
225225 }
226226
227227 public void eventB7 () {
228- String [] columnNames = {"ID" , "Nom " , "Prenom " , "Adresse " , "E-mail" };
228+ String [] columnNames = {"ID" , "Last name " , "First name " , "Address " , "E-mail" };
229229
230230 ArrayList <ArrayList <String >> data = AXML .print ();
231231
@@ -247,7 +247,7 @@ public void eventB7() {
247247 frame .pack ();
248248 frame .setVisible (true );
249249 } else {
250- JOptionPane .showMessageDialog (null , "Introuvable " , "Error" , JOptionPane .ERROR_MESSAGE );
250+ JOptionPane .showMessageDialog (null , "Not Found ! " , "Error" , JOptionPane .ERROR_MESSAGE );
251251 }
252252 }
253253
@@ -256,22 +256,22 @@ public void eventB8() {
256256 JTextField pretdate = new JTextField ();
257257 JTextField idadherent = new JTextField ();
258258 JTextField idoeuvre = new JTextField ();
259- dialogPanel .add (new JLabel ("Date de prete :" ));
259+ dialogPanel .add (new JLabel ("Lending date :" ));
260260 dialogPanel .add (pretdate );
261- dialogPanel .add (new JLabel ("ID d'adherent :" ));
261+ dialogPanel .add (new JLabel ("Member ID :" ));
262262 dialogPanel .add (idadherent );
263- dialogPanel .add (new JLabel ("ID d'oeuvre :" ));
263+ dialogPanel .add (new JLabel ("Book ID :" ));
264264 dialogPanel .add (idoeuvre );
265- int result = JOptionPane .showConfirmDialog (null , dialogPanel , "Preter LOG " , JOptionPane .OK_CANCEL_OPTION );
265+ int result = JOptionPane .showConfirmDialog (null , dialogPanel , "Lending Information " , JOptionPane .OK_CANCEL_OPTION );
266266 if (result == JOptionPane .OK_OPTION ) {
267267 if (!emprunter (new pret (pretdate .getText (), Integer .parseInt (idadherent .getText ()), Integer .parseInt (idoeuvre .getText ())))) {
268- JOptionPane .showMessageDialog (null , "Impossible d'emprunter " , "Error" , JOptionPane .ERROR_MESSAGE );
268+ JOptionPane .showMessageDialog (null , "Impossible to lend " , "Error" , JOptionPane .ERROR_MESSAGE );
269269 }
270270 }
271271 }
272272
273273 public void eventB9 () {
274- String [] columnNames = {"Date de prete " , "ID adherent " , "ID oeuvre " };
274+ String [] columnNames = {"Lending date " , "Member ID " , "Book ID " };
275275
276276 ArrayList <ArrayList <String >> data = PXML .print ();
277277
@@ -293,7 +293,7 @@ public void eventB9() {
293293 frame .pack ();
294294 frame .setVisible (true );
295295 } else {
296- JOptionPane .showMessageDialog (null , "Introuvable " , "Error" , JOptionPane .ERROR_MESSAGE );
296+ JOptionPane .showMessageDialog (null , "Not Found ! " , "Error" , JOptionPane .ERROR_MESSAGE );
297297 }
298298 }
299299}
0 commit comments