Presentation is loading. Please wait.

Presentation is loading. Please wait.

By mr Hanley 10/31/2014.  StdDraw is a class developed by Princeton University to help novice java programmers interact with a JFrame’s  A computer.

Similar presentations


Presentation on theme: "By mr Hanley 10/31/2014.  StdDraw is a class developed by Princeton University to help novice java programmers interact with a JFrame’s  A computer."— Presentation transcript:

1 By mr Hanley 10/31/2014

2  StdDraw is a class developed by Princeton University to help novice java programmers interact with a JFrame’s  A computer window uses x and y coordinates to determine where graphics are “painted”  Individual graphics can be drawn using StdDraw. followed by one of the lines or shapes

3  You need to set the bounds and scale of your window X=0, Y=0 X=width-1, Y=height-1

4  To change pen color use StdDraw.setPencolor(Color.black); or Color. And see which options pop up  StdDraw.clear(Color.choose a color) will clear the background to a certain color  StdDraw.show(milliseconds) will show the current scene for 20 milliseconds

5  Search for StdDraw.java from web  Copy source to a StdDraw class in your project  Make your program in a separate class  You don’t need to make changes to StdDraw.java file


Download ppt "By mr Hanley 10/31/2014.  StdDraw is a class developed by Princeton University to help novice java programmers interact with a JFrame’s  A computer."

Similar presentations


Ads by Google