Advertisement
Guest User

eTWQAWETGWERT

a guest
Dec 16th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public void paint(Graphics g){
  2. Graphics2D g2 = (Graphics2D)g;
  3. // g2.drawLine(100, 100, 200, 100);
  4. // g2.drawRect(100, 200, 100, 100);
  5. // g2.drawOval(250, 200, 100, 100);
  6.  
  7. int x=0;
  8. int y=0;
  9. int size=600;
  10. for(x=50,y=50;x<size-50;x+=10,y+=10){
  11. g2.drawRect(x, y, size-2*x, size-2*y);
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement