Skip to content

Haythamasalama/graphics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Java Graphic

github

Rep For Graphics Example on Java Using Graphic and Graphics2D Class

Contents

Install

$ git clone https://github.com/HaythamaSalama/graphic-java

How To Use

  • After install the project , the structure folder like this :

image

  • Every class that contains functions that draw something for example Arc Class that contains circle , example1

image

  • If you need to draw a specific function or show the output put the function on paint functon to show the output. by default, all functions exist on paint but it's committed

example this is paint method on Oval Class you need to show the output the example11() :

Before :

@Override
public void paint(Graphics g) {
  super.paint(g);
//    this.circle(g);
//    this.oval(g);
//    this.example3(g);
//    this.example4(g);
//    this.example5(g);
//    this.example6(g);
//    this.example7(g);
//    this.example8(g);
//    this.example9(g);
//    this.example10(g);
//    this.example11(g);
}

After :

@Override
public void paint(Graphics g) {
    super.paint(g);
//    this.circle(g);
//    this.oval(g);
//    this.example3(g);
//    this.example4(g);
//    this.example5(g);
//    this.example6(g);
//    this.example7(g);
//    this.example8(g);
//    this.example9(g);
//    this.example10(g);
   this.example11(g);
}

❤ Sponsor me if you find the work valuable

Buy Me A Coffee

Contributing

Pull requests and stars are always welcome.

License

Copyright © 2022, Haytham Salama. Released under the MIT License.