I found some code online to draw a pink heart.. sort of a valentine's day heart.. I would like to add to it and customize it some... But I can't get it to work as-is.. I get a compile error that "StdDraw Cannot be resolved" ... Here is the code.. Thanks for any input!!
import java.awt.color.*; import java.awt.Graphics; import javax.swing.JPanel; public class Heart { public static void main(String[] args) { StdDraw.setXscale(-1.5, +1.5); StdDraw.setYscale(-1.5, +1.5); StdDraw.setPenColor(StdDraw.PINK); // draw diamond double[] xs = { -1, 0, 1, 0 }; double[] ys = { 0, -1, 0, 1 }; StdDraw.filledPolygon(xs, ys); // circles StdDraw.filledCircle(+0.5, 0.5, 1 / Math.sqrt(2)); StdDraw.filledCircle(-0.5, 0.5, 1 / Math.sqrt(2)); } }