Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import java.awt.*;
  2. import javax.swing.JApplet;
  3.  
  4. public class GraphicsDemo extends JApplet
  5. {
  6. public void paint (Graphics g)
  7. {
  8. Image image = this.getImage(getDocumentBase(), "dolphins.jpg");
  9. g.drawImage(image, 0, 0, 427, 284, 0, 0, 864, 576, this);
  10.  
  11. g.setColor(Color.GREEN);
  12.  
  13. g.drawRect(214, 72, 107, 168);
  14.  
  15. g.drawLine(214, 72, 304, 235);
  16. g.drawLine(321, 72, 565, 235);
  17. g.drawLine(214, 240, 304, 646);
  18. g.drawLine(321, 240, 566, 646);
  19.  
  20. g.drawImage(image, 304, 235, 565, 646, 432, 145, 650, 487, this);
  21.  
  22. g.drawRect(304, 235, 261, 411);
  23.  
  24. g.fillOval(400, 390, 70, 30);
  25. g.setColor(Color.WHITE);
  26. g.drawString("JORDAN", 410, 410);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement