APL/APL2.1/TP06/Nuancier/TestNuance.java

18 lines
552 B
Java
Raw Normal View History

2022-03-07 17:26:31 +01:00
import javax.swing.*;
import java.awt.*;
public class TestNuance {
public static void main(String[] args) {
JFrame fenetre = new JFrame("Damier");
fenetre.setSize(500, 300);
fenetre.setLocation(100, 100);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
fenetre.setLayout(new GridLayout(1, 3));
fenetre.add(new Nuance("#FF0000", 100, 100));
fenetre.add(new Nuance("#00FF00", 100, 100));
fenetre.add(new Nuance("#0000FF", 100, 100));
fenetre.setVisible(true);
}
}