Une seule instance de la fenetre setting

This commit is contained in:
pablo rodriguez 2022-06-15 08:23:18 +02:00
parent 1d77351631
commit 5923875b44
59 changed files with 14 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -710,7 +710,8 @@ public class create extends JFrame {
@Override public void actionPerformed( ActionEvent e ) {
if(commandes.sujet.getNomElt().equals("fichier")) {
new setting();
// new setting();
setting.getInstance();
}
System.out.println( "ouvre la fenêtre setting" );

View File

@ -33,7 +33,7 @@ import java.awt.event.ActionEvent;
import java.awt.GridLayout;
import java.awt.Color;
public class setting extends JFrame {
public final class setting extends JFrame {
/**
*
@ -61,6 +61,8 @@ public class setting extends JFrame {
private JTextField textFieldTestCouleur;
private JButton btnExtraire;
private static setting instance;
// Bouton couleur de test
JButton btnCouleurInitTest;
JButton btnRougeMax;
@ -789,6 +791,15 @@ public class setting extends JFrame {
});
}
public static setting getInstance() {
if (instance == null) {
instance = new setting();
}
return instance;
}
/**
* vérification des valeurs saisies dans la fenêtre setting.
* @return