Эх сурвалжийг харах

Ajout de la fonctionnalité "Tout décocher"

Nathan Spaeter 5 жил өмнө
parent
commit
b2234b0d52
2 өөрчлөгдсөн 11 нэмэгдсэн , 1 устгасан
  1. 2 1
      jul.iml
  2. 9 0
      src/main/View.java

+ 2 - 1
jul.iml

@@ -36,5 +36,6 @@
         <SOURCES />
       </library>
     </orderEntry>
+    <orderEntry type="library" name="weka1" level="project" />
   </component>
-</module>
+</module>

+ 9 - 0
src/main/View.java

@@ -41,6 +41,15 @@ public class View extends JFrame {
                 Weka.traitement(juls);
             }
         });
+        boutonReset.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent actionEvent) {
+                for (int i=0;i<panimg.getComponents().length;i++){
+                    panimg.getComponents()[i].setBackground(Color.RED);
+                    juls.get(i).setChoisi(false);
+                }
+            }
+        });
 
         panimg.setLayout(new GridLayout(5,4));
         for (int i=0;i<20;i++){