Correction des derniers bugs

This commit is contained in:
Morgane Foussats 2021-02-13 12:17:03 +01:00
parent ef7515bc0c
commit 34acbe031e
96 changed files with 18 additions and 8 deletions

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

View file

Before

Width:  |  Height:  |  Size: 5,8 KiB

After

Width:  |  Height:  |  Size: 5,8 KiB

View file

@ -5,7 +5,7 @@
"port": 8080
},
"config":{
"interface": "wlan4",
"interface": "wlan3",
"portSrc": 26000,
"portDest":26001
}

View file

Before

Width:  |  Height:  |  Size: 5,8 KiB

After

Width:  |  Height:  |  Size: 5,8 KiB

View file

@ -79,6 +79,7 @@ public class FenetreModifPseudo implements ActionListener {
this.ok = new JButton("Continue");
this.Cancel = new JButton("Cancel");
this.ok.addActionListener(this);
this.ok.setSelected(false);
this.Cancel.addActionListener(this);
//On associe au bouton Connexion des actions a realiser
@ -104,15 +105,24 @@ public class FenetreModifPseudo implements ActionListener {
//Si le nouveau pseudo est acceptable
if(agent.changerPseudo(newPseudo)) {
//Affichage message
JOptionPane.showMessageDialog(frame, "Your new pseudo is "+newPseudo);
frame.dispose();
new FenetreMenu(agent);
//Affichage message
JOptionPane.showMessageDialog(frame, "Your new pseudo is "+newPseudo);
frame.dispose();
new FenetreMenu(agent);
//Sinon affichage message erreur
}else {
JOptionPane.showMessageDialog(frame, "Pseudo already use, choose another one");
if(!ok.isSelected() && !FenetreMenu.ouvert) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
JOptionPane.showMessageDialog(frame, "Pseudo already use, choose another one");
ok.setSelected(true);
frame.dispose();
new FenetreModifPseudo(agent);
}
}
} catch (HeadlessException e1) {

View file

Before

Width:  |  Height:  |  Size: 5,8 KiB

After

Width:  |  Height:  |  Size: 5,8 KiB