package com.nullprogram.maze;

import javax.swing.JFrame;

/* RunMaze - Contains the main function that drives the program. */
public class RunMaze {
    public static void main(String args[]) {

        /* Default maze behaviour */
        int width    = 60;
        int height   = 40;
        int unitSize = 15;
        int speed    = 10;

        /* Parse input arguments */
        if (args.length > 0) {
            try {
                width = Integer.parseInt(args[0]);
                if (args.length > 1) {
                    height = Integer.parseInt(args[1]);
                }
                if (args.length > 2) {
                    unitSize = Integer.parseInt(args[2]);
                }
                if (args.length > 3) {
                    speed = Integer.parseInt(args[3]);
                }
            } catch (NumberFormatException e) {
                System.err.println("Arguments must be integers");
                System.exit(1);
            }
        }

        /* Create a new maze */
        Maze newMaze = new Maze(width, height);

        /* Create a frame and a maze display */
        JFrame mazeFrame = new JFrame("Maze");
        MazeDisplay mazeDraw = new MazeDisplay(newMaze, unitSize);
        mazeFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        mazeFrame.add(mazeDraw);
        mazeFrame.pack();
        mazeFrame.setResizable(false);
        mazeFrame.setVisible(true);

        /* Now solve the maze */
        MazeSolve solution = new MazeSolve(newMaze, mazeDraw, speed);
    }
}

@@ -187,16 +187,127 @@
 rgs%5B%5D) %7B
+%0A        /* Fix for poor OpenJDK performance. */%0A        System.setProperty(%22sun.java2d.pmoffscreen%22, %22false%22);
 %0A%0A      

Add OpenJDK fix.