Npm : 201243501190
Nama : Reza Fahlevi
Kelas : R7H
Mata Kuliah : Komputer Grafik
Dosen : Nahot Frastian , M.Kom
Program Studi : Teknik Informatika
Universitas : Universitas Indraprasta Pgri
Program Komputer Grafik :
- Program BasisGrafik
Input :
import java.awt.Graphics ;
import java.awt.Color ;
public class basisgrapik extends java.applet.Applet {
public void paint ( Graphics g ) {
int xpts [] = {5,25,50,30,15,5};
int ypts [] = { 10, 35 ,20 ,65, 40, 10 } ;
g.drawString ( " Java Graphics Basic ",0 , 50 ) ;
g.drawLine (5,100,150,250) ;
g.setColor ( Color.red ) ;
g.drawRect ( 50,100,150,250) ;
g.drawRoundRect ( 50 , 150 , 150,250 , 6 , 12 ) ;
g.drawPolygon ( xpts , ypts , xpts.length ) ;
// Cara Lain Buat Polygon
//Polygon poly = new Polygon (xpts + 100 , ypts+100 , xpts.length ) ;
// g.fillPolygon ( poly);
g.drawOval (150,100,250,55 ) ;
g.drawArc ( 50,100,150,275,95,115);
}
}
Proses :
 drawString : kordinat x nya : 0 dan kordinat Y nya :50 , sedangkan kata String
nya : Java Graphics Basic
 drawLine nya : kordinat x1 nya 5 , x2 nya = 150 , y1 = 100 , y2 = 250
 Lalu warna yang di gunakan adalah warna merah ( setColor )
 drawRect : kordinat x1 nya 50 , x2 nya = 150 , y1 = 100 , y2 = 250
 drawRoundRect x1 = 50 ,int y = 150 , int width = 150 , int height = 250 , int
xdiam=6 , int ydiam = 12
 drawOval : kordinat x1 nya 150 , x2 nya = 250 , y1 = 100 , y2 = 55
 drawArc x1 = 50 ,int y = 100 , int width = 150 , int height = 275 , int
statangle=95 , int arcangle = 15
Output :

More Related Content

DOCX
Basic graphics
DOCX
Basis grafik
DOCX
Basis graphics
DOCX
Basis graphics
DOCX
Kuis 1
DOCX
Mypoly
DOCX
DOCX
My poly
Basic graphics
Basis grafik
Basis graphics
Basis graphics
Kuis 1
Mypoly
My poly

What's hot (13)

PDF
SPL 10.1 | Manual Tracing on Basic Loop & 1D Array
PPTX
Dip 5 mathematical preliminaries
PDF
Lec23-CS110 Computational Engineering
PPTX
Csci101 lect08a matlab_programs
PPT
Function Families
PDF
Linear programming assignment help
PDF
2D array
PDF
Programa expresiones regulares
PDF
Coding Test Review1
PPTX
PDF
Line drawing algorithm
PPTX
Linear regression
PPT
Snowboards r us
SPL 10.1 | Manual Tracing on Basic Loop & 1D Array
Dip 5 mathematical preliminaries
Lec23-CS110 Computational Engineering
Csci101 lect08a matlab_programs
Function Families
Linear programming assignment help
2D array
Programa expresiones regulares
Coding Test Review1
Line drawing algorithm
Linear regression
Snowboards r us
Ad

Viewers also liked (20)

DOCX
Grafik garis
PPTX
Kekuatan dan kelemahan
PPTX
Modifikasi grafik column
DOC
Tesis ajuan
DOCX
Myoval
PPTX
Belum terlambat, tetap semangat
DOCX
Myline
DOCX
Aplikasi program komputer grafik
PPTX
Modifikasi grafik line
PPTX
Real brokerage services encyclopedia.pptx3
DOCX
Makalah komgraf
PPT
Pencapaian akreditasi dan modulnya
PDF
Performa puncak
PDF
kata-kata penyemangat hidup
PPT
Strategi Melobi & Closing
PPT
Negosiasi
PPS
Bab pelayanan pasien
PPS
Standar mutu rs akreditasi kars 2012
PPS
Point point akreditasi rumah sakit 2012
PPS
Standar akreditasi rumah sakit APK AP PP PAB
Grafik garis
Kekuatan dan kelemahan
Modifikasi grafik column
Tesis ajuan
Myoval
Belum terlambat, tetap semangat
Myline
Aplikasi program komputer grafik
Modifikasi grafik line
Real brokerage services encyclopedia.pptx3
Makalah komgraf
Pencapaian akreditasi dan modulnya
Performa puncak
kata-kata penyemangat hidup
Strategi Melobi & Closing
Negosiasi
Bab pelayanan pasien
Standar mutu rs akreditasi kars 2012
Point point akreditasi rumah sakit 2012
Standar akreditasi rumah sakit APK AP PP PAB
Ad

Similar to Basis graphics (20)

DOCX
Program uts
DOCX
PPT
java graphics
DOCX
Warna rgb
PDF
Introduction to Generative Art with Processing
DOC
COMPUTER GRAPHICS LAB MANUAL
ODP
Java Fx Overview Tech Tour
PDF
Python 1 liners
PPTX
PDF
Processing and Processing.js
PDF
C programming
PDF
C programming (Part 1)
PDF
PDF
Computer graphics lab manual
RTF
PPTX
The Java Fx Platform – A Java Developer’S Guide
PPT
Struct examples
PDF
AI & ML Lab Manual1_BCE.pdf artificial intelligence
DOCX
Qust & ans inc
PDF
Google I/O 2013 - Android Graphics Performance
Program uts
java graphics
Warna rgb
Introduction to Generative Art with Processing
COMPUTER GRAPHICS LAB MANUAL
Java Fx Overview Tech Tour
Python 1 liners
Processing and Processing.js
C programming
C programming (Part 1)
Computer graphics lab manual
The Java Fx Platform – A Java Developer’S Guide
Struct examples
AI & ML Lab Manual1_BCE.pdf artificial intelligence
Qust & ans inc
Google I/O 2013 - Android Graphics Performance

More from fahlevizha (20)

PPTX
PPT Komgraf
DOCX
Warnargb
DOCX
Satutitikhilang
DOCX
My line2d
DOCX
Font1
DOCX
DOCX
Tugas no 2
DOCX
Tugas no 1 b
DOCX
Tugas no 1 a
DOCX
String rect warna
DOCX
String dan rect
DOCX
Segiempat1
DOCX
Segiempat
DOCX
Rumah
DOCX
DOCX
Oval , string , line
DOCX
My ovalsetengah
DOCX
My ovalacak
DOCX
Myline
DOCX
PPT Komgraf
Warnargb
Satutitikhilang
My line2d
Font1
Tugas no 2
Tugas no 1 b
Tugas no 1 a
String rect warna
String dan rect
Segiempat1
Segiempat
Rumah
Oval , string , line
My ovalsetengah
My ovalacak
Myline

Recently uploaded (20)

PPTX
TNA_Presentation-1-Final(SAVE)) (1).pptx
PDF
IGGE1 Understanding the Self1234567891011
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
Hazard Identification & Risk Assessment .pdf
PDF
Complications of Minimal Access-Surgery.pdf
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PDF
International_Financial_Reporting_Standa.pdf
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
Empowerment Technology for Senior High School Guide
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PPTX
20th Century Theater, Methods, History.pptx
PDF
Weekly quiz Compilation Jan -July 25.pdf
TNA_Presentation-1-Final(SAVE)) (1).pptx
IGGE1 Understanding the Self1234567891011
AI-driven educational solutions for real-life interventions in the Philippine...
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
Unit 4 Computer Architecture Multicore Processor.pptx
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
Environmental Education MCQ BD2EE - Share Source.pdf
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Hazard Identification & Risk Assessment .pdf
Complications of Minimal Access-Surgery.pdf
B.Sc. DS Unit 2 Software Engineering.pptx
International_Financial_Reporting_Standa.pdf
FORM 1 BIOLOGY MIND MAPS and their schemes
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
Empowerment Technology for Senior High School Guide
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
20th Century Theater, Methods, History.pptx
Weekly quiz Compilation Jan -July 25.pdf

Basis graphics

  • 1. Npm : 201243501190 Nama : Reza Fahlevi Kelas : R7H Mata Kuliah : Komputer Grafik Dosen : Nahot Frastian , M.Kom Program Studi : Teknik Informatika Universitas : Universitas Indraprasta Pgri
  • 2. Program Komputer Grafik : - Program BasisGrafik Input : import java.awt.Graphics ; import java.awt.Color ; public class basisgrapik extends java.applet.Applet { public void paint ( Graphics g ) { int xpts [] = {5,25,50,30,15,5}; int ypts [] = { 10, 35 ,20 ,65, 40, 10 } ; g.drawString ( " Java Graphics Basic ",0 , 50 ) ; g.drawLine (5,100,150,250) ; g.setColor ( Color.red ) ; g.drawRect ( 50,100,150,250) ; g.drawRoundRect ( 50 , 150 , 150,250 , 6 , 12 ) ; g.drawPolygon ( xpts , ypts , xpts.length ) ; // Cara Lain Buat Polygon //Polygon poly = new Polygon (xpts + 100 , ypts+100 , xpts.length ) ; // g.fillPolygon ( poly); g.drawOval (150,100,250,55 ) ; g.drawArc ( 50,100,150,275,95,115); } }
  • 3. Proses :  drawString : kordinat x nya : 0 dan kordinat Y nya :50 , sedangkan kata String nya : Java Graphics Basic  drawLine nya : kordinat x1 nya 5 , x2 nya = 150 , y1 = 100 , y2 = 250  Lalu warna yang di gunakan adalah warna merah ( setColor )  drawRect : kordinat x1 nya 50 , x2 nya = 150 , y1 = 100 , y2 = 250  drawRoundRect x1 = 50 ,int y = 150 , int width = 150 , int height = 250 , int xdiam=6 , int ydiam = 12  drawOval : kordinat x1 nya 150 , x2 nya = 250 , y1 = 100 , y2 = 55  drawArc x1 = 50 ,int y = 100 , int width = 150 , int height = 275 , int statangle=95 , int arcangle = 15