public void runDemo(String demoName) {
        Class demoClass = null;

        try {
            demoClass = Class.forName("markharder.physicsdemos.demo.demos." + demoName);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }

        if (demoClass == null) {
            System.out.println("Demo not found.");
            return;
        }

        Class[] parameters = new Class[] {int.class, int.class};

        Constructor<Demo> demoConstructor = null;
        
        try {
            demoConstructor = demoClass.getConstructor(parameters);
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        }

        if (demoConstructor == null) {
            System.out.println("Constructor does not exist.");
            return;
        }

        try {
            currentDemo = demoConstructor.newInstance(new Object[] {width, height});
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("Could not instantiate an object.");
            return;
        }

        currentDemo.start();
    }