Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import javax.swing.JApplet;
- public class GraphicsDemo extends JApplet
- {
- public void paint (Graphics g)
- {
- Image image = this.getImage(getDocumentBase(), "dolphins.jpg");
- g.drawImage(image, 0, 0, 427, 284, 0, 0, 864, 576, this);
- g.setColor(Color.GREEN);
- g.drawRect(214, 72, 107, 168);
- g.drawLine(214, 72, 304, 235);
- g.drawLine(321, 72, 565, 235);
- g.drawLine(214, 240, 304, 646);
- g.drawLine(321, 240, 566, 646);
- g.drawImage(image, 304, 235, 565, 646, 432, 145, 650, 487, this);
- g.drawRect(304, 235, 261, 411);
- g.fillOval(400, 390, 70, 30);
- g.setColor(Color.WHITE);
- g.drawString("JORDAN", 410, 410);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement