bonjour ,
je cherche à supprimer une personne selon un nom , mais ça ne marche pas quand je met une condition sur le champs s'il est vide ou pas ( lignes en rouge), lorsque j'enlève les conditions ça marche :
méthode pour supprimer :
code du bouton supprimer :
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
5
6
7
8
9
10
11
merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16private void btnSuppActionPerformed(java.awt.event.ActionEvent evt) { JOptionPane j = new JOptionPane(); String n= jNom.getText(); if(n.equals("")){ j.showMessageDialog(null,"CHAMP VIDE","confirmation", JOptionPane.ERROR_MESSAGE); } else if(!n.isEmpty()) { int op= j.showConfirmDialog(null,"choisie une réponse","oui,Non",JOptionPane.YES_NO_OPTION , JOptionPane.QUESTION_MESSAGE); if (op == JOptionPane.OK_OPTION) { Stockage.supprimer(n); j.showMessageDialog(null,"personne "+n+" Supprimée","confirmation", JOptionPane.INFORMATION_MESSAGE); } } }

 

 
		
		 
         
 

 
			
			

 
   
 


 supprimer dans une arrayList
 supprimer dans une arrayList
				 Répondre avec citation
  Répondre avec citation
 
   
						


 
			 
 
Partager