Advertisement
Aniket_Goku

task

Mar 3rd, 2021
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. import java.applet.*;
  2. import java.awt.*;
  3. public class ex2 extends Applet
  4. {
  5.     public void paint(Graphics no)
  6.     {
  7.         no.drawLine(100,100,100,400);
  8.         no.drawLine(200,100,200,400);
  9.         no.drawLine(0,200,300,200);
  10.         no.drawLine(0,300,300,300);
  11.         no.drawLine(105,100,195,195);
  12.         no.drawLine(195,100,105,195);
  13.         no.drawLine(5,205,95,295);
  14.         no.drawLine(95,205,5,295);
  15.         no.drawLine(295,205,205,295);
  16.         no.drawLine(205,205,295,295);
  17.         no.drawLine(105,305,195,395);
  18.         no.drawLine(195,305,105,395);
  19.     }
  20. }
  21. /*
  22. <applet code="ex2.class" width="500" height="500"></applet>
  23. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement