private DisplayMode getBestDisplayMode() {
		
		DisplayMode[] program_displays = { new DisplayMode(640 , 480, DisplayMode.BIT_DEPTH_MULTI, DisplayMode.REFRESH_RATE_UNKNOWN),
				                           new DisplayMode(800 , 600, DisplayMode.BIT_DEPTH_MULTI, DisplayMode.REFRESH_RATE_UNKNOWN),
				                           new DisplayMode(1024, 768, DisplayMode.BIT_DEPTH_MULTI, DisplayMode.REFRESH_RATE_UNKNOWN),
				                           new DisplayMode(1280, 960, DisplayMode.BIT_DEPTH_MULTI, DisplayMode.REFRESH_RATE_UNKNOWN),
		                                 };
		
		DisplayMode[] device_displays  = device.getDisplayModes();
		DisplayMode   display          = null;
		
		boolean[]     displays         = {false, false, false, false};
		double        dimension_gap    = 99999;
		
		for(int i=0;i<program_displays.length;i++) { //Loop for each standard program display
			for(int n=0;n<device_displays.length;n++) { //Loop for each compatible device display
				
				if(displayModesMatch(device_displays[n], program_displays[i])) { //If the device display is also a standard program display
					displays[i] = true;
					program_displays[i] = device_displays[n];
				}
				
				else {
					if(device_displays[n].getWidth()/4 == device_displays[n].getHeight()/3) { //Check if the device display is in ration 4:3
						for(int t=0;t<program_displays.length;t++) { //Loop for each standard program display
							if(Math.sqrt(Math.pow((double) device_displays[n].getWidth() - program_displays[t].getWidth(), 2.0)) <= dimension_gap) { //Check if the dimension gap < than before
								display = device_displays[n];
								dimension_gap = Math.sqrt(Math.pow((double) device_displays[n].getWidth() - program_displays[t].getWidth(), 2.0));
							}
						}
					}
				}
				
			}
		}
		
		for(int i=0;i<4;i++) {System.out.println(displays[i]);}
		
		for(int i=program_displays.length-1;i>-1;i--) {
			if(displays[i]) {
				System.out.println(program_displays[i].getWidth()+" "+program_displays[i].getHeight());
				return program_displays[i];}
		}
		
		System.out.println(display.getWidth()+", "+display.getHeight());
		return display;
	}