public static void setHardwareAcceleration(int newValue) {
		try {
			switch (newValue) {
			case 0:
			case 2:
			case 5:
				System.setProperty("sun.java2d.opengl", "false"); //$NON-NLS-1$ //$NON-NLS-2$
				break;
			case 1:
			case 3:
				System.setProperty("sun.java2d.opengl", "True"); //$NON-NLS-1$ //$NON-NLS-2$
				System.setProperty("sun.java2d.noddraw", "true");  //$NON-NLS-1$//$NON-NLS-2$
				break;
			case 4:
			case 6:
				System.setProperty("sun.java2d.opengl", "True"); //$NON-NLS-1$ //$NON-NLS-2$
				System.setProperty("sun.java2d.noddraw", "true");  //$NON-NLS-1$//$NON-NLS-2$
				// Used to workaround problems with some drivers 
				System.setProperty("sun.java2d.opengl.fbobject","false"); //$NON-NLS-1$ //$NON-NLS-2$
			}
			HARDWARE_ACCELERATION = newValue;
		} catch (Exception e) {
			System.err.println(e.getLocalizedMessage());
		}
	}