I am taking an AP computer programming class and one of the codes I have to write is as follows, could someone please help me and write it because I am quite stuck, thank you: The Müller-Lyer illusion is caused by an image that consists of two parallel line segments. One line segment looks like an arrow with two heads, and the other line segment looks like an arrow with two tails. Although the line segments are of exactly the same length, they appear to be unequal (see below). Write a graphics program that illustrates this illusion. As the JFrame is resized, the illusion should stay centered horizontally and maintain its position vertically. Additionally, draw a small dot which is centered in the center of the frame and label the coordinates of the dot below it with text ( i.e. (412, 138) ). As the JFrame is resized, the dot should remain centered with the current coordinates of the center below it. My code so far: package q303_starykh_centeredillusion; import java.awt.*; import javax.swing.*; /** * * @author matveystarykh */ public class Q303_Starykh_CenteredIllusion { /** * @param args the command line arguments */ Line line = new Line(); public static void main(String[] args) { // TODO code application logic here JFrame frame = new JFrame(); frame.setTitle("Colored Grid"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(500, 500); frame.setLayout(new GridLayout(1,1)); frame.add(line,BorderLayout.CENTER); } public class Line extends JPanel{ public void paintComponent (Graphics g){ super.paintComponent(g); double x1 = (getWidth() - 0.75 * getWidth())/2; double x2 = x1 + getWidth() * 0.75; g.drawLine((int) x1,10, (int) x2, 10); } } }