From ae43ed1b4fda55eb6f408efd58d58db2b5378fad Mon Sep 17 00:00:00 2001 From: HORVILLE Ewen Date: Tue, 8 Mar 2022 17:15:30 +0100 Subject: [PATCH] TP07 --- APL2.1/TP07/Accueil/Accueil.class | Bin 0 -> 1007 bytes APL2.1/TP07/Accueil/Accueil.java | 32 ++++++++++++++++++++++++++ APL2.1/TP07/Accueil/LoginScreen.class | Bin 0 -> 933 bytes APL2.1/TP07/Accueil/LoginScreen.java | 22 ++++++++++++++++++ APL2.1/TP07/Accueil/login.jpg | Bin 0 -> 30693 bytes APL2.1/TP07/Cercles/Cercles.class | Bin 0 -> 734 bytes APL2.1/TP07/Cercles/Cercles.java | 20 ++++++++++++++++ APL2.1/TP07/Cercles/Circles.class | Bin 0 -> 907 bytes APL2.1/TP07/Cercles/Circles.java | 31 +++++++++++++++++++++++++ APL2.1/TP07/Formes/Formes.class | Bin 502 -> 598 bytes APL2.1/TP07/Formes/Formes.java | 21 ++--------------- APL2.1/TP07/Formes/NewJFrame.class | Bin 661 -> 0 bytes APL2.1/TP07/Formes/NewPanel.class | Bin 0 -> 1245 bytes APL2.1/TP07/Formes/NewPanel.java | 29 +++++++++++++++++++++++ APL2.1/TP07/Sautoir/Sablier.class | Bin 0 -> 907 bytes APL2.1/TP07/Sautoir/Sablier.java | 29 +++++++++++++++++++++++ APL2.1/TP07/Sautoir/Sautoir.class | Bin 0 -> 811 bytes APL2.1/TP07/Sautoir/Sautoir.java | 20 ++++++++++++++++ 18 files changed, 185 insertions(+), 19 deletions(-) create mode 100644 APL2.1/TP07/Accueil/Accueil.class create mode 100644 APL2.1/TP07/Accueil/Accueil.java create mode 100644 APL2.1/TP07/Accueil/LoginScreen.class create mode 100644 APL2.1/TP07/Accueil/LoginScreen.java create mode 100644 APL2.1/TP07/Accueil/login.jpg create mode 100644 APL2.1/TP07/Cercles/Cercles.class create mode 100644 APL2.1/TP07/Cercles/Cercles.java create mode 100644 APL2.1/TP07/Cercles/Circles.class create mode 100644 APL2.1/TP07/Cercles/Circles.java delete mode 100644 APL2.1/TP07/Formes/NewJFrame.class create mode 100644 APL2.1/TP07/Formes/NewPanel.class create mode 100644 APL2.1/TP07/Formes/NewPanel.java create mode 100644 APL2.1/TP07/Sautoir/Sablier.class create mode 100644 APL2.1/TP07/Sautoir/Sablier.java create mode 100644 APL2.1/TP07/Sautoir/Sautoir.class create mode 100644 APL2.1/TP07/Sautoir/Sautoir.java diff --git a/APL2.1/TP07/Accueil/Accueil.class b/APL2.1/TP07/Accueil/Accueil.class new file mode 100644 index 0000000000000000000000000000000000000000..cb3710889f8fb971fe0a3605a315f2ba1f1eef6b GIT binary patch literal 1007 zcmZuw&rcIU7=6=jyL4Gfw?L(0K}4~zE%gVA0wPdCf+>(#f&os;c5D{gU9#N@;?1jP z&)z)fMK0UKCZ3Idl<}KwRY;t}o0)Ik_v_8f&tKoZ1DM0Af?f*O@y2OVmXU52QD4WlY1l@UyMcgVqe2}_U*Hs-`mtkk+gq6Gl-FtOkCD`)qB>>u zQJPi5d{uRwrcGf6E`=c}f)pyTp7Vxv*1gi~esFVS-L)DPT{FgUh2EYRAuw@ogd?=e z(9CF#Ot-+!X~A%fFd7&odVLv;(we9&0~rxIJ8vVjmkhTcm2{0|H2m-p(G!(K#Ya?+ z`jB6 EZvrdO0ssI2 literal 0 HcmV?d00001 diff --git a/APL2.1/TP07/Accueil/Accueil.java b/APL2.1/TP07/Accueil/Accueil.java new file mode 100644 index 0000000..82c2e7e --- /dev/null +++ b/APL2.1/TP07/Accueil/Accueil.java @@ -0,0 +1,32 @@ +import javax.swing.*; +import java.awt.*; + +public class Accueil { + public static void main(String[] args) { + JFrame f = new JFrame("Accueil"); + f.setSize(285, 200); + f.setLocation(100, 100); + f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + f.setLayout(null); + + LoginScreen login = new LoginScreen(); + login.setLocation(0, 0); + login.setSize(278, 183); + f.add(login); + + JTextField loginLabel = new JTextField(); + loginLabel.setBackground(new Color(0, 0, 0, 0)); + loginLabel.setLocation(100, 90); + loginLabel.setSize(170, 30); + f.add(loginLabel); + + JTextField passLabel = new JTextField(); + passLabel.setBackground(new Color(0, 0, 0, 0)); + passLabel.setLocation(100, 130); + passLabel.setSize(170, 30); + f.add(passLabel); + + f.setResizable(false); + f.setVisible(true); + } +} \ No newline at end of file diff --git a/APL2.1/TP07/Accueil/LoginScreen.class b/APL2.1/TP07/Accueil/LoginScreen.class new file mode 100644 index 0000000000000000000000000000000000000000..075f9b37245fd8c783b0e3f5f4df7236ad012c5a GIT binary patch literal 933 zcmYjQ?QRl56g|U77wEQplve9^u_{mmYt^dMR>i0oY7=Q}(tiU?muZ*Xbyy0?(v68?tatZQo zDzmD#x0H8VnLBEmSEit$s9}vEYTAah7*dU6e#$F+=vC@HZip(w%$BsIx6KgF7d|pX zYIa93BpcEa?+3k>aQAu3q{zI(rRCM^o?~0W@)(x#=U{JK?sR3lUsVuuO^>%vcDdtc zYA7)zn)bkLi`P;ir5cJ%v+W9Dl@%Wy87yeHtD}qxL)<4@K6VTp_pq)bg|v?Q*wFC+ z4|P1krjEyWqT?y5I<}N~hHV`?c+M~zKqrz4|8u23l$KF>7hs>B3US7rh)rYrwr!qB zDl%;d@0B>>1Jj$vviZV!<&!808KbMds0^zUX-rP9Ha(XfuLg3a(vt+-BSjX2h-Z8h zr0nlG{L_H0Pha~ zh!vX4B#ksfNVSu^5c$-0vRT@#BTOEUF8%;3{zNDf9wG7_(XW2eBH4Mm0%(XJMi6mY zmvCW{E)n%lD{CXn>=sARzF@gTYixvgDI6v*LI2qi^iuH~qJCuVK!Jy#z%OBj>>R-) dp$0BX9CKvLbb66aVqkxf)99OGbXR3v{tt6S(2@WE literal 0 HcmV?d00001 diff --git a/APL2.1/TP07/Accueil/LoginScreen.java b/APL2.1/TP07/Accueil/LoginScreen.java new file mode 100644 index 0000000..3ddf9d5 --- /dev/null +++ b/APL2.1/TP07/Accueil/LoginScreen.java @@ -0,0 +1,22 @@ +import javax.swing.*; +import java.awt.*; + +public class LoginScreen extends JComponent { + private Image login; + public LoginScreen() { + super(); + this.login = Toolkit.getDefaultToolkit().getImage("login.jpg"); + } + + @Override + protected void paintComponent(Graphics brush) { + Graphics newBrush = brush.create(); + + if (this.isOpaque()) { + newBrush.setColor(this.getBackground()); + newBrush.fillRect(0, 0, this.getWidth(), this.getHeight()); + } + + newBrush.drawImage(this.login, 0, 0, this); + } +} \ No newline at end of file diff --git a/APL2.1/TP07/Accueil/login.jpg b/APL2.1/TP07/Accueil/login.jpg new file mode 100644 index 0000000000000000000000000000000000000000..139f22270cb18adebc44a1a8c3f2f344a021c6a3 GIT binary patch literal 30693 zcmeFZ3Hakw)i^vbY_boaBby8ZiWp{+G)_lMyy=nvgx*h*v(nJHHnKf7q* z+Hs-9qD{b`b^pHpD1U!H4Bb^Q>;x-ib*N}7yF(kE$S#boMBqiM51zPk*VMvgiq7i|gO*bZqb`%G^<~+iuPwt@Vk^1`iY_CFm1q(t2=stu2?R~R z2>45^K$EL*VpSrwY~8hd&DP*e&l|J-sIb37da!-Q?uGU)(Z+N12Iu*-y?;m&U!G_&?^W;FkRasw?!=c|C4y`qF&Xz4}6omf5 z(`8wnSoT5DaMa;A*nc(r)(#sey!wq-T22nNH9!LJ6-Z(QLN-xy6`lrvAp~88AR7Uh zw|onX>QFWG_#I#%$f^X=nRnl)(ObI%VO8Z&eg^<=L!!EI+qb}J_D8nj$c7cH=j2?H zX8feA@Xb%xGukp{{B>nN(3-KU9kiU&g5k*TY8wmH9MVFcb&OjzHq@}cCV>;P=`HYb z-J=ayy}eUkGkX1S4N8z3daZl*kGicBXS$v*Zs@n};Xmp(lm9hvdH^RWs==Ebn(I*+ zs+XsDDpRJY9Gq%UL95u0)M9!n7t`Z%t~#nxRI*`OECnId?8;D}{lb-}KCsV(I*@8C zbOu+0%D_;P%9#aINzfKmY|b82I;>D-@Uqv)XQ);_(`ywnJ+qi;wCU`)SIqQ!OpY2> zvg2W81~8YQsyS-B@YBdq$$Fk5Yq?C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?3#4Cr+Qc=xq%X$?G@fTwDV`3CKI{Fx9nVm zB19?9wJ4D$1?@3Ly<9f!e*;{8FE&%M^Xh73eRUb3VV+Fh$9}=q1jj^ipB9cig+asQ z6USrve9|CtN7hp9(aq+gJRFS;Q?jQ4DuV*q8fQ}i{2Gy}}JD3YB8~9=w0nw$xzZZ*D zI1@{c0m~(Ul}GUVBn!~BKQF^X-z|H|&3}JE>G`*2pFhycri!t|Mw8<7559~nlcK^&y+-n zw$Ihhi|rdDKFBUEp}yW~SP1Vw)p*mTVe4||MGEev2gaZTgN`f%kT^-Tdrbi8lU)EG75a~LH_K03eLAm$_LsfK* z{4~?TJrJK`fnczh40s||2_>#&=Zc5mP^c-3&$vD9$u&i$Nu+lt-glERTwZZ1lu%uM zD3%-BE7n+MV4#X$?MfcGboKrXyS=(UY?7;*?C7H{RVigBC_|05xf3VlvWd!p;JJH- zN7p1iRr!U@bp|Zf8FE{zez2X~RBQ#xtP9ntZ&o@$Ge%9PXv}(D+^};$s$Y5Swq*O{ zs_NigeKUK|QpS)%WK9dR5-3sv&&4b;$C-@j9fjCE!MYmvo{4@E0rTHcxPD8pK#fns zSu(7R{K&3Sa}BB2)P6GT%9+$zt64!NCRS$rqeoz{tjuHCK5ik%&SD;$+&i{jyJB93 zsUJU~6Xfmq!|Z#-YfG&np1;uBQsL={S46hBJ;&RhpR8fAvCA7pB{X9qLbmwZ@RezR zcMlkWZF5n2UWI|b)tSzcKVQG-zW4SIs-fNosFvW6VVt45Ioh9NKL_2`RQ(}%MQ2le`8EXTwD1;5u>F#rGn literal 0 HcmV?d00001 diff --git a/APL2.1/TP07/Cercles/Cercles.class b/APL2.1/TP07/Cercles/Cercles.class new file mode 100644 index 0000000000000000000000000000000000000000..5ca797928beee25d2eaf29bf218cb4528fdf1c2c GIT binary patch literal 734 zcmZuv+iuf95Iq|^apStprBF&QK)4hq4lx8Ikc#?}s!~weNCXuXo;L9kZI#%S?NI1% z@Fl!B5|#J>#BcBiJR@eENZ|q7Iy*aaW@qNCfBgCO9l&!uGf~2(fvqKMo5)~C!7T;1 z72Hu!F>u#J9-9g%mY>D$sn~r54-9M@*k#DQl)jAj88o|k!l1VTPcRfZ(ig{*abJXQ zcz;A5eaxlLux`Kaobiv`9dUo?_To_b!#$N~_JT<`5QkEct(FJ}BM~(e)j}C-3}t11 za-$2%a9Dt$EgKS0p0*zjvdxgwt zS(`%dI3@O*z64pP=oP&LIVYFEa9Dz+E96h7Fpugb_N&BxCRna(S^~?dCs=vwkh$vU u2?~p%O;~AZ69yHepOea0U}Bg24Xoe=R@83MBOlyu^k;cWjY1jxRF2L zPB$)$#Hb{mPtD zX-Y){%A8i|8HvF-Vi;1%*%+g962lVb1&mv6*$t-!v~=d7KqT*PI079DZrQnC+gx{o z6?@&|Nqfb1%VFN%toUW8918TL7oOSMcFx`jb9Vx}QgRE`DJ9Xi9NLBFi*}{Kl(--e zU-oN3!I^cHl9_jdg6CAn6x~Dz5+>5fm>9vRi7YOf7(>p)C0sT!uFMrouz{o7^1kN> zig?w;BqmHQ;<|wRBg@Vd@jvcZsE1mhzKmt*>x>T{Z zYJ_k_k2zn_31>KAG4N~U4S^HKiH+W-$f`PA7W)+FI<}~0S#2pwl~s2mEHz~31!6py zbKGKyyNy0|J@0{2U?|h`{3(W^q6Sq}m$q$BKwq7kU%4%i_}6;#3JmhyxAP+bTEO>- z1Z^j?L3%;2kL*EwVZZ@s&>o4`&y0D(imrk^8&5VxdoGZ=;j87 zSjlj-ac1{mVVVDhC+LNZBm(r|CHnD}_4mYm!~hW>LO;ZiM9(3FID`}j*gBx9z{$p4 Gy}tqB$F{Ek literal 0 HcmV?d00001 diff --git a/APL2.1/TP07/Cercles/Circles.java b/APL2.1/TP07/Cercles/Circles.java new file mode 100644 index 0000000..6c5868b --- /dev/null +++ b/APL2.1/TP07/Cercles/Circles.java @@ -0,0 +1,31 @@ +import javax.swing.*; +import java.awt.*; + +public class Circles extends JComponent { + public Circles() { + super(); + } + + @Override + protected void paintComponent(Graphics brush) { + Graphics newBrush = brush.create(); + + if (this.isOpaque()) { + newBrush.setColor(this.getBackground()); + newBrush.fillRect(0, 0, this.getWidth(), this.getHeight()); + } + + for (int x = 0; x < 5; x++) { + for (int y = 0; y < 5; y++) { + Color c = new Color(0, 70 + 37 * y, 70 + 37 * x); + int sizeX = getWidth() / 5; + int sizeY = getHeight() / 5; + + newBrush.setColor(c); + newBrush.fillOval(sizeX * x, sizeY * y, sizeX, sizeY); + newBrush.setColor(Color.WHITE); + newBrush.fillOval(sizeX * x + sizeX / 4, sizeY * y + sizeY / 4, sizeX / 2, sizeY / 2); + } + } + } +} \ No newline at end of file diff --git a/APL2.1/TP07/Formes/Formes.class b/APL2.1/TP07/Formes/Formes.class index 652357d5448d4d672c7cc90d144e3e319ab07c64..099268c0d2d17a27f4eda3a0ad05b136bc2b423e 100644 GIT binary patch delta 324 zcmZvXyGjF55Qe{#jqYY$<2{L*+a{W9Hc0RS7B)&c5wR1?gV{!O*CLqbSkl_~2sQ~Q z_yD$ok76m#v9WQAZ)SdGnEAh~&+N(j_sbh_NY`baf=$t(JKs6idR{U$I7xWmcp% zqt{rn4Ey6J)#$(CTusSMa4);r33GqDRcx8^amCImP0HfPr^OBdd*VTfYTj7;0om^^ Av;Y7A delta 229 zcmYL@I}*WA6o$W>AQJITL>?Z&Fr#Hgt<_qC+FBy3P->V_Sbzms2aVD=SL5E9??12q z-1{iJ&E@@by#XsG4i0S#uZ-_t(9sAqx*DNIWZ_%H*?MPIaI@nusF1ky=(`LwhNLbd z#@Tb9AC$kbWv4y{3ULUllJ!KDXmNf)og`4ygr#3Gz@|<^Vm-RW6f?~7ml`b!XUhNi YNE{H#6A>OUiQJSvQ~8UcDLsSM7ayM%9smFU diff --git a/APL2.1/TP07/Formes/Formes.java b/APL2.1/TP07/Formes/Formes.java index 3a7287f..892517e 100644 --- a/APL2.1/TP07/Formes/Formes.java +++ b/APL2.1/TP07/Formes/Formes.java @@ -1,25 +1,6 @@ import javax.swing.*; import java.awt.*; -class NewJFrame extends JComponent { - public NewJFrame() { - super(); - } - - @Override - protected void paintComponent(Graphics brush) { - Graphics newBrush = brush.create(); - - if (this.isOpaque()) { - newBrush.setColor(this.getBackground()); - newBrush.fillRect(0, 0, this.getWidth(), this.getHeight()); - } - - newBrush.setColor(this.getForeground()); - - } -} - public class Formes { public static void main(String[] args) { JFrame f = new JFrame("Formes"); @@ -27,6 +8,8 @@ public class Formes { f.setLocation(100, 100); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + f.add(new NewPanel()); + f.setVisible(true); } } \ No newline at end of file diff --git a/APL2.1/TP07/Formes/NewJFrame.class b/APL2.1/TP07/Formes/NewJFrame.class deleted file mode 100644 index 5d7385518aca9a2d646bce55a9063a7f12812043..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 661 zcmZuv%Wl&^6g?9svFl6=eFa)xZFtmqP_tuE#DYkHR((hmfy8d=49P%Z8`~lL3ZKCy zNG$jOz6l}Dq%0zVrMYwG&OK-DJ=Z^ffBymCF&_D-q3&ZH*L?W6Zq1fGZd>n$H8<_? zmi2DCxZ`3+p!&qbrg$pg1kKk1k!kXV*z z;I70y+?RNOJ&6EKi5A)t9cvz9Un0bwz|yIn9`!OcCQaSqKZp6$#Dnl?p|I6|%3_yM zrd2`IX3+dk*#e%)&r8vSbqX1=bdU-DH$x2SnwXlF%1eUy$SS z+G^pE<&EhV!#V9CJ7D02HiID*^xm1#=%tS6y1^m8xq3{XK>G4s>~K~!ju$9FSg~kV zc-rMIxK~==AimP!%xHb40acXYa$Uvh-*k-%9Nx6sGn7tRGdN$c)!|;Aq0(_2dQ~oW s2G2&97`3FOIq5bD!73_zUGnt}MjKe;gf?ga58@XZE`Ke-h(&Gw0V^_vbN~PV diff --git a/APL2.1/TP07/Formes/NewPanel.class b/APL2.1/TP07/Formes/NewPanel.class new file mode 100644 index 0000000000000000000000000000000000000000..11626aca87c869b905026c3beb6b91c6f8d996fe GIT binary patch literal 1245 zcmZux>r&HD5dP8@(uM=HXPPs!12A(kHTGR()vDn^2Mq9KB(tb7(kiuX|!&sDropymuGXUd|2@WMO& zSWoIFZZdtO=VeMk{itCXE?N0wy&DPw6ZW1|(7a$+a;bE*E1j&qYm%m^pc|GuVILK2 zOIogi_Sj{x8AmT17`bAKLo{YwJ$JaM7d%fDFBNDRyX55Lw84=Yrfug)7W)~Bz*SsR z@k(F}<8+mi9@74Tl^2-6q(B$02uxvGU`wM$i;0?AE1efH=if&1h7_#q&WbwqX z^2xax>XB;D3*uDTsxE8W=Al8kB6;af%6+|Lx>a3ktoO2P=UVDQkW9UfDCjw_tEp4g zjO$SHREy4rvsZ3;O#KnNVxDsT7oBoH~B}k_Jjs=LUfwNA=U6%^=BqA_%}gz2#}st@ zr=%5ZD$%VBMzkgeYrIj`7(}H9xJB<^C%wK3d_0sS`ADYmrS&?U2H+cfQB#{XunBeEAFSL_ipojWz;Xm%TPa|D?xj(j8MYwCrP7! zLm49R1&yo>YxE3;2g_(m#J{30f{)=rvT5EVi!fXKKx8W#4TL+-&{9TgBHHHJl+n(h zd|*)h1O#YC9eqCpqG&}6eLULHOMHik@g%XGC%!wxb)VSY_9!U7(XEo5f;(QMp1;hz B7*YTL literal 0 HcmV?d00001 diff --git a/APL2.1/TP07/Formes/NewPanel.java b/APL2.1/TP07/Formes/NewPanel.java new file mode 100644 index 0000000..27a87fc --- /dev/null +++ b/APL2.1/TP07/Formes/NewPanel.java @@ -0,0 +1,29 @@ +import javax.swing.*; +import java.awt.*; + +public class NewPanel extends JComponent { + private Image circles; + + public NewPanel() { + super(); + + this.circles = Toolkit.getDefaultToolkit().getImage("cercles.png"); + } + + @Override + protected void paintComponent(Graphics brush) { + Graphics newBrush = brush.create(); + + if (this.isOpaque()) { + newBrush.setColor(this.getBackground()); + newBrush.fillRect(0, 0, this.getWidth(), this.getHeight()); + } + + newBrush.setColor(Color.BLUE); + newBrush.drawRect(10, 10, 50, 50); + newBrush.drawImage(this.circles, 150, 50, this); + newBrush.setColor(Color.MAGENTA); + newBrush.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 24)); + newBrush.drawString(">o<", 150, 50); + } +} \ No newline at end of file diff --git a/APL2.1/TP07/Sautoir/Sablier.class b/APL2.1/TP07/Sautoir/Sablier.class new file mode 100644 index 0000000000000000000000000000000000000000..7f9d0c28ee811e47e944c1169eb7340699f25c3d GIT binary patch literal 907 zcmZuw-A)r>5ItXa+ijPH78JAy2=%XpLKXjuF@Yv(4YbA@N#$xOYx%V7*6minXYkS+ zFZ3Psq9(@p06vWmV2tN$YsKg$-^}cpnX_kRcfbAo{1w1;teCKH%EU=bnHa*fGBfJ- zw2EexnNzo^7|!6Viq080Z{UJ}IN&Mr917?y`N|Q9+>)*gZVPDX%wwVjZ-;1nUAj)G zy|?Z7kL>LRk&&h?-Jsy@H9gmH1A&S3`ZN2bowN6Y++E*p?#fzgMNte_0=xEn!)|sv z4WtFkir4mQ&K;?ktcu+ZJn1i~b_=5zvyj2Og#~0SEMmz*4i_z4!m@?S%3Q%!1J^9h ze#62|vxNJ2 z!eQ!8u*PxfzSnkl1jddw7QBY%udu7-a5Ibrjvd)bFRfM*CCjGV33j`*d;u{6_Z(T@ zn-Y;|z z+L-S^dy8b2Uhg2B)ig#C9;1V3_9J2hBVWv_rj@I@N|mc&<-(0}X@E1QK!adjAE19% z=X*4&tj9z*Xo_SPlX|2BGn))2BPvjHgt~Jqcb73t)p14%VxvgWW;oF*PGA#BG%<#If)$Ew@)y%3wDAA{ literal 0 HcmV?d00001 diff --git a/APL2.1/TP07/Sautoir/Sablier.java b/APL2.1/TP07/Sautoir/Sablier.java new file mode 100644 index 0000000..d3a6a35 --- /dev/null +++ b/APL2.1/TP07/Sautoir/Sablier.java @@ -0,0 +1,29 @@ +import javax.swing.*; +import java.awt.*; + +public class Sablier extends JComponent { + public Sablier() { + super(); + } + + @Override + protected void paintComponent(Graphics brush) { + Graphics newBrush = brush.create(); + + if (this.isOpaque()) { + newBrush.setColor(this.getBackground()); + newBrush.fillRect(0, 0, this.getWidth(), this.getHeight()); + } + + newBrush.setColor(Color.CYAN); + + int[] x1 = {0, getWidth(), getWidth() / 2}; + int[] y1 = {0, 0, getHeight() / 2}; + + int[] x2 = {0, getWidth(), getWidth() / 2}; + int[] y2 = {getHeight(), getHeight(), getHeight() / 2}; + + newBrush.fillPolygon(x1, y1, 3); + newBrush.fillPolygon(x2, y2, 3); + } +} \ No newline at end of file diff --git a/APL2.1/TP07/Sautoir/Sautoir.class b/APL2.1/TP07/Sautoir/Sautoir.class new file mode 100644 index 0000000000000000000000000000000000000000..db2d9aa53f59c35ec390e716b3a25a6fd7e7786d GIT binary patch literal 811 zcmZuvOK;Oa5dPMAIB{I+wkZ^v7D``E+|;x{Ih4ntsHiAyC4z!dF5M(<+19Zm$DzQP zU&4hm7e}HJM-CkLHJp%m%sP?E0n7SkcIKPiZ+73aTHX{WH75i!F35Y zB+N;;sbXG31`BersA5S&4h0F6&JBpmGH0roRZ(O}-xr<;A2KA&VvQlW<+mJ$(Teb# zys^1Hm&bE-n zdX@J=Uj(bNRL2DJ4CB&&V|UMJ2m9%Ez}rMrheXLK>9DY(qby++Hp4`GGCvFLCxK{H z_*=ghN+#uRVJ)t1xWWl^tmC$hJGjeWT&Ue|oH)&pVbc763u@O1tKuEWNSQl3vZ)+J zDt?oP!l&M+X!Y1R;ypLqa{aEe-*JLrDrv_2tmMbC7^a7(NV$X9F8BDc6U5h*;H?%z z=^xIP-|qOHv=*oV4>YWg}n6bPV&=VIkv^i7-+&Ov8+D$tp(}eeqslAOC!}k`WB4 zNQo6~V1)d6XjmZeizr};np%bplOB5!k5IxhdIkqr!6C(tD051~zDiX(lwVj=p|GDc LYKCj^uG4=35`U@T literal 0 HcmV?d00001 diff --git a/APL2.1/TP07/Sautoir/Sautoir.java b/APL2.1/TP07/Sautoir/Sautoir.java new file mode 100644 index 0000000..fae89de --- /dev/null +++ b/APL2.1/TP07/Sautoir/Sautoir.java @@ -0,0 +1,20 @@ +import javax.swing.*; +import java.awt.*; + +public class Sautoir { + public static void main(String[] args) { + JFrame f = new JFrame("Sautoir"); + f.setSize(500, 500); + f.setLocation(100, 100); + f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + f.setLayout(new GridLayout(6, 5)); + for (int i = 0; i < 30; i++) { + Sablier s = new Sablier(); + s.setLocation(20 + (i%5) * 40, i/5 * 40); + s.setSize(40, 40); + f.add(s); + } + + f.setVisible(true); + } +} \ No newline at end of file