Grosse session de travail

This commit is contained in:
Vieira
2022-03-28 15:12:08 +02:00
parent a2dc8eab26
commit 86b8708e25
13 changed files with 146 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
import java.awt.Color;
public class Grisaille extends Color{
public Grisaille(int greyByte){
super(greyByte, greyByte, greyByte, 255);
}
}

View File

@@ -0,0 +1,19 @@
import javax.swing.*;
import java.awt.*;
public class testGrisaille{
public static void main(String[] args){
JFrame fenetre = new JFrame();
fenetre.setSize(800,800);
fenetre.setLocation(5,5);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel button = new JPanel();
button.setBackground(new Grisaille(100));
fenetre.add(button,BorderLayout.CENTER);
fenetre.setVisible(true);
}
}