|
@@ -6,8 +6,12 @@ import java.awt.*;
|
|
|
import java.awt.event.ActionEvent;
|
|
import java.awt.event.ActionEvent;
|
|
|
import java.awt.event.ActionListener;
|
|
import java.awt.event.ActionListener;
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
|
|
|
+
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
|
|
+import java.util.Collection;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
public class View extends JFrame {
|
|
public class View extends JFrame {
|
|
|
|
|
|
|
|
private JButton boutonExport= new JButton("Exporter");
|
|
private JButton boutonExport= new JButton("Exporter");
|
|
@@ -39,6 +43,7 @@ public class View extends JFrame {
|
|
|
panimg.setLayout(new GridLayout(5,4));
|
|
panimg.setLayout(new GridLayout(5,4));
|
|
|
for (int i=0;i<20;i++){
|
|
for (int i=0;i<20;i++){
|
|
|
JButton button = new JButton();
|
|
JButton button = new JButton();
|
|
|
|
|
+ button.setBackground(Color.RED);
|
|
|
button.setSize(new Dimension(200,200));
|
|
button.setSize(new Dimension(200,200));
|
|
|
try {
|
|
try {
|
|
|
Jul j = new Jul();
|
|
Jul j = new Jul();
|
|
@@ -50,6 +55,11 @@ public class View extends JFrame {
|
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
|
ex.printStackTrace();
|
|
ex.printStackTrace();
|
|
|
}
|
|
}
|
|
|
|
|
+ button.addActionListener(e -> {
|
|
|
|
|
+ Color bg = button.getBackground().equals(Color.GREEN) ? Color.RED: Color.GREEN;
|
|
|
|
|
+ button.setBackground(bg);
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
panimg.add(button);
|
|
panimg.add(button);
|
|
|
}
|
|
}
|
|
|
|
|
|