Java Drawline Ve Setstroke Ve Drawoval, Filloval Kullanımı

Java drawline ve setstroke ve drawoval, filloval kullanımıkullanımı ile cep telefonu mpdeli yapımı.
 
 
 
 

 Java drawLine() ve setStroke() ve drawOval(), fillOval kullanımı;

 

import java.awt.Graphics;
import java.awt.Color;
import java.awt.Font;
import java.applet.Applet;
import java.awt.*;

public class ceptelefonumodeli extends Applet {

    public void paint(Graphics tel) {


        tel.setColor(new Color(0, 0, 0));
        tel.drawRoundRect(10, 10, 150, 350, 20, 20);
        tel.setColor(new Color(190, 100, 0));
        tel.setFont(new Font("ITALIC", Font.BOLD, 20));
        tel.drawString("DİJİCELL", 40, 50);
        tel.fillOval(40, 50, 85, 10);
        tel.setColor(new Color(0, 0, 0));
        tel.drawRect(25, 25, 120, 180);
        tel.drawRect(25, 220, 120, 125);
        tel.drawLine(145, 190, 25, 190);
        tel.drawOval(75, 230, 20, 20);
        tel.setColor(new Color(50, 150, 0));
        tel.fillRect(30, 230, 40, 20);
        tel.setColor(new Color(255, 25, 0));
        tel.fillRect(100, 230, 40, 20);
        tel.setColor(new Color(80, 100, 120));
        tel.setFont(new Font("ITALIC", Font.BOLD, 10));
        tel.drawString("1", 42, 272);
        tel.drawRect(30, 260, 30, 15);
        tel.setFont(new Font("ITALIC", Font.BOLD, 10));
        tel.drawString("2", 82, 272);
        tel.setFont(new Font("ITALIC", Font.BOLD, 10));
        tel.drawString("3", 122, 272);
        tel.drawRect(70, 260, 30, 15);
        tel.setFont(new Font("ITALIC", Font.BOLD, 10));
        tel.drawString("4", 42, 292);
        tel.setFont(new Font("ITALIC", Font.BOLD, 10));
        tel.drawString("5", 82, 292);
        tel.setFont(new Font("ITALIC", Font.BOLD, 10));
        tel.drawString("6", 122, 292);
        tel.drawRect(110, 260, 30, 15);
        tel.setFont(new Font("ITALIC", Font.BOLD, 10));
        tel.drawString("7", 42, 312);
        tel.drawRect(30, 280, 30, 15);
        tel.setFont(new Font("ITALIC", Font.BOLD, 10));
        tel.drawString("8", 82, 312);
        tel.drawRect(70, 280, 30, 15);
        tel.setFont(new Font("ITALIC", Font.BOLD, 10));
        tel.drawString("9", 122, 312);
        tel.drawRect(110, 280, 30, 15);
        tel.setFont(new Font("ITALIC", Font.BOLD, 13));
        tel.drawString("*", 42, 334);
        tel.drawRect(30, 300, 30, 15);
        tel.setFont(new Font("ITALIC", Font.BOLD, 10));
        tel.drawString("0", 82, 332);
        tel.drawRect(70, 300, 30, 15);
        tel.setFont(new Font("ITALIC", Font.BOLD, 10));
        tel.drawString("#", 122, 332);
        tel.drawRect(110, 300, 30, 15);
        tel.drawRect(30, 320, 30, 15);
        tel.drawRect(70, 320, 30, 15);
        tel.drawRect(110, 320, 30, 15);
    }
}
 

 

Java drawLine() ve setStroke() ve drawOval(), fillOval kullanımı ekran çıktısı;

 

 

Başlıksız İçerik______________________

Emre TEMEL

Yorumunuzu Ekleyin


Yükleniyor...
Yükleniyor...