Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.applet.*;
- import java.awt.*;
- public class ex2 extends Applet
- {
- public void paint(Graphics no)
- {
- no.drawLine(100,100,100,400);
- no.drawLine(200,100,200,400);
- no.drawLine(0,200,300,200);
- no.drawLine(0,300,300,300);
- no.drawLine(105,100,195,195);
- no.drawLine(195,100,105,195);
- no.drawLine(5,205,95,295);
- no.drawLine(95,205,5,295);
- no.drawLine(295,205,205,295);
- no.drawLine(205,205,295,295);
- no.drawLine(105,305,195,395);
- no.drawLine(195,305,105,395);
- }
- }
- /*
- <applet code="ex2.class" width="500" height="500"></applet>
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement