BUT2/DEV/DEV2.1/TP08_Evenement/Q3_Radio/Fond.java~
2023-10-23 13:23:36 +02:00

19 lines
534 B
Java

import javax.swing.*;
import java.awt.*;
public class Fond{
public static void main(String[] args) {
JButton boutonCyan = new JButton("Cyan");
JButton boutonMagenta = new JButton("Magenta");
JButton boutonJaune = new JButton("Jaune");
JButton[] boutonList = {boutonCyan,boutonMagenta,boutonJaune};
FondEvent fenetreClass = new FondEvent(boutonList);
fenetreClass.fenetre();
boutonCyan.addActionListener(fenetreClass);
boutonMagenta.addActionListener(fenetreClass);
boutonJaune.addActionListener(fenetreClass);
}
}