import java.awt.*; import javax.swing.*; // This code is responsible for displaying the Robots in their environment public class RobotEnvironmentPanel2 extends JPanel { public static final int WIDTH = 800; public static final int HEIGHT = 600; private static Robot[] robots; // an array to hold the robots private static Beacon[] beacons; // an array to hold the beacons public RobotEnvironmentPanel2(Robot[] rArray, Beacon[] bArray) { robots = rArray; beacons = bArray; setPreferredSize(new Dimension(WIDTH, HEIGHT)); } // Display the image public void paintComponent(Graphics g) { super.paintComponent(g); // Display the beacons first for (int i=0; i