Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.applet.*;
- import java.awt.*;
- public class apps {
- int tabX [] = {322,322,322,342,352,362,372,382,382,322};
- int tabY [] = {220,170,160,170,160,170,160,170,220,220};
- public void paint(Graphics g) {
- g.drawLine(120,120,160,40);
- g.drawLine(160,40,320,30);
- g.drawLine(320,40,360,120);
- g.drawLine(120,120,360,120);
- g.drawLine(160,220,320,120);
- g.drawLine(320,220,320,120);
- g.drawLine(160,220,320,220);
- g.setColor(Color.red);
- g.fillPolygon(tabX, tabY, 10);
- g.setColor(Color.yellow);
- g.fillOval(30,20,50,50);
- g.setColor(Color.green);
- g.fillRect(0,221,400,50);
- Image img;
- img=getImage(getDocumentBase(),"drzewo.gif");
- g.drawImage(img,0,95,this);
- }
- }
Add Comment
Please, Sign In to add comment