Advertisement
tachia

Untitled

Sep 3rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1.  
  2. import java.awt.Canvas;
  3. import java.awt.Color;
  4. import java.awt.Frame;
  5. import java.awt.Graphics;
  6. import javax.swing.JComponent;
  7. import javax.swing.JFrame;
  8.  
  9. public class Rectangle extends Canvas{
  10.     Canvas canvas;
  11.    
  12.     void makeRect (int a, int b, int c , int d){
  13.         canvas.setSize(500,500);
  14.         Graphics g=canvas.getGraphics();
  15.         g.drawRect(a, b, c, d);
  16.        
  17.     }
  18.  
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement