From 663e795de29950c3ed6672d8c70d107284baaccd Mon Sep 17 00:00:00 2001 From: pourchot Date: Mon, 13 Mar 2023 11:30:07 +0100 Subject: [PATCH] 13 Mars --- .../TP4:Heritage/Documentation/Deuxieme.class | Bin 0 -> 726 bytes .../TP4:Heritage/Documentation/Deuxieme.java | 11 ++++++++ .../TP4:Heritage/Documentation/Premier.class | Bin 0 -> 565 bytes .../TP4:Heritage/Documentation/Premier.java | 10 ++++++++ DEV2.1/TP4:Heritage/Grisaille.class | Bin 0 -> 1057 bytes DEV2.1/TP4:Heritage/Grisaille.java | 24 ++++++++++++++++++ 6 files changed, 45 insertions(+) create mode 100644 DEV2.1/TP4:Heritage/Documentation/Deuxieme.class create mode 100644 DEV2.1/TP4:Heritage/Documentation/Deuxieme.java create mode 100644 DEV2.1/TP4:Heritage/Documentation/Premier.class create mode 100644 DEV2.1/TP4:Heritage/Documentation/Premier.java create mode 100644 DEV2.1/TP4:Heritage/Grisaille.class create mode 100644 DEV2.1/TP4:Heritage/Grisaille.java diff --git a/DEV2.1/TP4:Heritage/Documentation/Deuxieme.class b/DEV2.1/TP4:Heritage/Documentation/Deuxieme.class new file mode 100644 index 0000000000000000000000000000000000000000..42804a6119f0f1515add08de96dbfb45157a20d3 GIT binary patch literal 726 zcmZuv-A)rh6#iy+?QWMTrCvE0x(*vQ?%R04PnmaSj2!#>s))}0}If^5=bg2oAoN$pSNrnCeQn!iLA?+gSa4|{yQ6AKG2%ABk?CI;t%!hoM+I>s*R!(d-N7qG<-cPVqjHDRsq5IcFm literal 0 HcmV?d00001 diff --git a/DEV2.1/TP4:Heritage/Documentation/Premier.java b/DEV2.1/TP4:Heritage/Documentation/Premier.java new file mode 100644 index 0000000..a241996 --- /dev/null +++ b/DEV2.1/TP4:Heritage/Documentation/Premier.java @@ -0,0 +1,10 @@ +import java.lang.*; + +public class Premier{ + + public static void main(String[] args) { + for (String arg: args){ + System.out.println(arg.toUpperCase()); + } + } +} \ No newline at end of file diff --git a/DEV2.1/TP4:Heritage/Grisaille.class b/DEV2.1/TP4:Heritage/Grisaille.class new file mode 100644 index 0000000000000000000000000000000000000000..e36c669511a46c65870c1e4a1de5236bb5ab4e87 GIT binary patch literal 1057 zcmZuwT~pIg5Iv!Rv>~M*P>NO*6tpdcC<-b?REl7*d^mMr@Z;eEmrgWII!OxXuka7} z7o5?D!pIEIjz7wAZ>R|B%O<;f&fc@T_x||#?HIr$R#l{MC4vDAhH+KJH4Lfb46C?~ z8^UB2y z{)E_9v?W7L$nqiD^P%y$dWeogDCHxBHx3Y4DkP+j34CutErbZyS&*C1ju53}*YfBQ zVjCk(#1D{YB3T%1qI=#G#Wnfh4BTjal^I YIkmV>&Aq1fE)gpPDM70HgJPF|0WZVnD*ylh literal 0 HcmV?d00001 diff --git a/DEV2.1/TP4:Heritage/Grisaille.java b/DEV2.1/TP4:Heritage/Grisaille.java new file mode 100644 index 0000000..6657ca1 --- /dev/null +++ b/DEV2.1/TP4:Heritage/Grisaille.java @@ -0,0 +1,24 @@ +import javax.swing.*; +import java.awt.*; + +public class Grisaille extends Color{ + + public Grisaille(int val){ + super(val, val, val); + } + + public static void main(String[] args) { + if (args.length <= 0){ + System.err.println("args missing"); + System.exit(1); + } Integer arg = Integer.parseInt(args[0], 10); + JFrame fenetre = new JFrame(); + fenetre.setSize(400, 200); + fenetre.setLocation(0, 0); + fenetre.setVisible(true); + JPanel panel = new JPanel(); + panel.setBackground(new Grisaille(arg)); + fenetre.add(panel); + fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + } +} \ No newline at end of file