From 055df406da9b7e07189ff4e535a06bee43b84139 Mon Sep 17 00:00:00 2001 From: Vieira Date: Mon, 4 Apr 2022 15:20:54 +0200 Subject: [PATCH] =?UTF-8?q?Soy=20gay,=20pero=20como=20est=C3=A1=20escrito?= =?UTF-8?q?=20en=20espa=C3=B1ol=20nadie=20lo=20entender=C3=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APL2.1/TP8/Radio/ObservateurRadio.class | Bin 0 -> 825 bytes APL2.1/TP8/Radio/ObservateurRadio.java | 34 +++++++++++++++++++ APL2.1/TP8/Radio/Radio.class | Bin 0 -> 1275 bytes APL2.1/TP8/Radio/Radio.java | 42 ++++++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 APL2.1/TP8/Radio/ObservateurRadio.class create mode 100644 APL2.1/TP8/Radio/ObservateurRadio.java create mode 100644 APL2.1/TP8/Radio/Radio.class create mode 100644 APL2.1/TP8/Radio/Radio.java diff --git a/APL2.1/TP8/Radio/ObservateurRadio.class b/APL2.1/TP8/Radio/ObservateurRadio.class new file mode 100644 index 0000000000000000000000000000000000000000..832b9e7a55c3ec50b4947cb2151640e866310376 GIT binary patch literal 825 zcmZuvU2hUW6g|7pE-YK1TWS%7YHKTBc3U;^fyM+0nixJBX=?g7z(}^jZnF&3M}JLy z)@V(9@CW#tjPcH_X>8MMc4qFGd(XZ1%>DJ}$4>yy@YIBbTpS79F>x397z%N$#v%f!@7k{>{5Tn%~q@X*20#w(%0DulKjq?ktp5% z2_Fazc?DhXq2*2m_jqt6q$dKBQ$wUEo6Fr8sG6s!5f`Bv4SzCW9?6v{mXzpW`jCs> zBzZ~G@W;MP7<$Qy6hc0>^tt+)B<_@p7bNc}@Mn^L<-g|$14~CVFbSF^a;9IGlG1?b zbWUTLR-3Fc**fiJ`8%|7@*7zLYj%q2$g23;e*yejxA_17 literal 0 HcmV?d00001 diff --git a/APL2.1/TP8/Radio/ObservateurRadio.java b/APL2.1/TP8/Radio/ObservateurRadio.java new file mode 100644 index 0000000..3e2b8e1 --- /dev/null +++ b/APL2.1/TP8/Radio/ObservateurRadio.java @@ -0,0 +1,34 @@ + import java.awt.*; + import javax.swing.*; + import java.awt.event.*; + + public class ObservateurRadio implements ActionListener + { + private JPanel panneau; + + public ObservateurRadio(JPanel panneau) + { + this.panneau = panneau; + } + + @Override + public void actionPerformed(ActionEvent e) + { + String action = e.getActionCommand(); + + if (action == "CYAN") + { + panneau.setBackground(Color.CYAN); + } + + else if (action == "MAGENTA") + { + panneau.setBackground(Color.MAGENTA); + } + + else if (action == "YELLOW") + { + panneau.setBackground(Color.YELLOW); + } + } + } diff --git a/APL2.1/TP8/Radio/Radio.class b/APL2.1/TP8/Radio/Radio.class new file mode 100644 index 0000000000000000000000000000000000000000..f28c5a0ce27a26cac7cde4a45d4b9c2c381f6472 GIT binary patch literal 1275 zcmZuxOH&hD5dID%nJ`2NK^_sGSAm2C=U$%}d<6sqheXAKimpzQBaRhjsL2G>g*$id z+_`h-&T`?T%2-zE(jR5r?iotrtvfZ<-KYEO?$h6yGe3WQ`3B$$9_ToMDGeDNJ(yyV zWiibnry;LHPR6RLkoK0b?zxt|HOGniy3=xNYRO`-{y^3(=NtnQIEhmNDYl;*%{{^!t4prjRtXd_ zpTGi(+gSWB=AN`wLtwN!alYkwj=k(UtsQ}}?#OD;F^uyRm12oIF9~RC#pT7)!y=7Z zSv1Y^ra-b>Z7O$HdaC6Hc??|^7~+bC-1CfO*Q%THh12plL>s(=l>}CCmxYQ+eywOCl|rSy^Ew`^jTE zHR)Ln5k5w%+v-C!?v7w;1oFdXWL@6>AAAzg+~(<9i*bg8jojM zO;6d%75J;Gh1#X^#-E5FG1~;tK?jxFu z`G|F(Q8>P~uS*^D(ONG=I_R&Y5^WqRL<93Mn*=BC0GnC|$;wO{gN1m$gH$CJX=BL8 zk$gJpV|X*4rs}LTR_O?PM@W&E6?sR}(RAF$XgU@uEl{}`A7h)jeCnu=@m$2mv4c6E zAWakXArAh7^y4V_n?H;x48Wj&%Pa=zlBQ6?5Goi(4WrnhoIOIm!Z=*!1oi2`