import hsafx.*; /** * This is a template for creating programs using hsafx. Fill in the run method * below with your code. * * @author YOUR NAME */ public class ConsoleTemplate extends ConsoleView { @Override public void run() { // You can tweak the numbers and text on the line below. They are: // width, height, font size for println, title c = new Console(600, 400, 12, "HSA FX Console Template", this); // ================= Your Code Starts Here //text c.setFont("Arial",40); c.setFill("red"); c.fillText("hi",100,120); //lines c.setLineWidth(10); c.strokeLine(10,10,80,80); //black rectangle (100-row, 200-col, 20-width, 50-height) c.setLineWidth(2); c.strokeRect(100,200,20,50); //blue rectangle c.setFill("blue"); c.fillRect(210,210,20,30); //POLYGONS // use an array to hold the coordinates of each point(vertex) double[] cols = new double[5]; double[] rows = new double[5]; int numVertices = 5; cols[0] = 150 ; rows[0] = 90 ; cols[1] = 400 ; rows[1] = 90 ; cols[2] = 400 ; rows[2] = 190 ; cols[3] = 200 ; rows[3] = 190 ; cols[4] = 350 ; rows[4] = 160 ; c.setFill("#c5cfe3"); //lightblue hex value from color picker c.fillPolygon(cols,rows, numVertices); // ================= Your Code Ends Here } // don't change anything below here Console c; public static void main(String[] args) { launch(args); } }