12.07.2015 Views

Drawing and Java2D

Drawing and Java2D

Drawing and Java2D

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Lines <strong>and</strong> rectangles import java.awt.Graphics; g.drawLine( int x1, int y1, int x2, int y2 );● Coordinates in pixels from top-left of component drawRect( x, y, w, h ), fillRect● (x,y) is top-left corner of rectangle draw3DRect( x, y, w, h, boolean raised )● Border-shading so it looks raised or sunken drawRoundRect( x, y, w, h, arcW, arcH )● Specify diameter of rounded cornersCMPT166: drawing <strong>and</strong> <strong>Java2D</strong> 15 Feb 201111

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!