Tanpa Banyak Basa-Basi Langsung Aja Nih Scriptnya Tinggal Copas ! ( Copy/Paste Hanya Untuk Orang Pemalasan Saja? )...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package pertemuan10;
import java.awt.Canvas;import java.awt.Color;import java.awt.Frame;import java.awt.Graphics;
/** * * @author RullyMNH */public class StudiKasus extends Canvas {
public void paint(Graphics g) { g.setColor(Color.GRAY); g.fillRect(0, 0, 600, 600);
g.setColor(new Color(0, 225, 225));
g.fillOval(200, 30, 40, 20); g.fillOval(230, 50, 65, 30); g.fillOval(300, 60, 80, 40); g.fillOval(260, 50, 95, 60);
g.setColor(new Color(200, 250, 0)); g.drawArc(80, 320, 70, 50, -180, -180); g.drawLine(80, 345, 149, 345); g.drawOval(103, 330, 7, 7); g.drawOval(123, 330, 7, 7); g.drawRect(80, 350, 70, 60); g.drawRoundRect(65, 350, 10, 60, 10, 10); g.drawRoundRect(155, 350, 10, 60, 10, 10); g.drawRoundRect(97, 410, 10, 30, 10, 10); g.drawRoundRect(127, 410, 10, 30, 10, 10);
g.setColor(Color.yellow); g.fillOval(100, 40, 60, 60); g.drawLine(80, 40, 90, 50); g.drawLine(130, 20, 130, 30); g.drawLine(170, 40, 160, 50); g.drawLine(80, 100, 100, 90); g.drawLine(130, 130, 130, 110); g.drawLine(180, 100, 160, 90);
g.setColor(Color.black); g.drawLine(350, 250, 300, 350); g.drawLine(350, 250, 400, 350);
g.setColor(Color.green); g.drawLine(300, 350, 400, 350); g.drawLine(300, 350, 300, 450); g.drawLine(300, 450, 400, 450); g.drawLine(400, 350, 400, 450);
g.setColor(Color.pink); g.drawLine(360, 360, 360, 400); g.drawLine(360, 360, 390, 360); g.drawLine(390, 400, 360, 400); g.drawLine(390, 360, 390, 400);
g.setColor(Color.pink); g.drawLine(375, 360, 375, 400); g.drawLine(360, 380, 390, 380);
g.setColor(Color.black); g.drawLine(320, 400, 350, 400); g.drawLine(320, 400, 320, 450); g.drawLine(350, 400, 350, 450);
g.setColor(new Color(0, 225, 225)); g.fillOval(200, 40, 60, 20); g.fillOval(230, 20, 65, 30); }
public static void main(String[] args) { Frame f = new Frame("Gambar Rumah"); StudiKasus sk = new StudiKasus(); f.add(sk); f.setSize(600, 600); f.setVisible(true); }}
Bukti Dari Script Di Atas
No comments:
Post a Comment