} else if (tmp.getName().equals("window")) {
} else if (tmp.getName().equals("windows")) {
  public static void loadConfig(String configFileName, DeviceEntry defaultDevice)  {		File configFile = new File(configPath, configFileName);				if (defaultDevice == null) {		    defaultDevice = 	            new DeviceEntry("Default device", null, "org.microemu.device.Device", true, false);		}    	defaultDevice.setDefaultDevice(true);    	devices.add(defaultDevice);    String xml = "";    try {      InputStream dis = new BufferedInputStream(new FileInputStream(configFile));      while (dis.available() > 0) {        byte[] b = new byte[dis.available()];        dis.read(b);        xml += new String(b);      }    } catch (FileNotFoundException ex) {      loadDefaultConfig();      return;    } catch (IOException ex) {      System.out.println(ex);      loadDefaultConfig();      return;    }    XMLElement configRoot = new XMLElement();    try {      configRoot.parseString(xml);    } catch (XMLParseException ex) {      System.err.println(ex);      loadDefaultConfig();      return;    }        for (Enumeration e = configRoot.enumerateChildren(); e.hasMoreElements(); ) {      XMLElement tmp = (XMLElement) e.nextElement();      if (tmp.getName().equals("devices")) {        for (Enumeration e_device = tmp.enumerateChildren(); e_device.hasMoreElements(); ) {          XMLElement tmp_device = (XMLElement) e_device.nextElement();          if (tmp_device.getName().equals("device")) {                        boolean devDefault = false;            if (tmp_device.getStringAttribute("default") != null && tmp_device.getStringAttribute("default").equals("true")) {              devDefault = true;              defaultDevice.setDefaultDevice(false);            }            String devName = null;            String devFile = null;            String devClass = null;            for (Enumeration e_cont = tmp_device.enumerateChildren(); e_cont.hasMoreElements(); ) {              XMLElement tmp_cont = (XMLElement) e_cont.nextElement();              if (tmp_cont.getName().equals("name")) {                devName = tmp_cont.getContent();              } else if (tmp_cont.getName().equals("filename")) {                devFile = tmp_cont.getContent();              } else if (tmp_cont.getName().equals("class")) {                devClass = tmp_cont.getContent();              }            }            devices.add(new DeviceEntry(devName, devFile, devClass, devDefault));          }        }      } else if (tmp.getName().equals("window")) {    	  for (Enumeration ew = tmp.enumerateChildren(); ew.hasMoreElements(); ) {    		  XMLElement tmp_window = (XMLElement) ew.nextElement();    		  if (tmp_window.getName().equals("main")) {    	    	  for (Enumeration em = tmp_window.enumerateChildren(); em.hasMoreElements(); ) {		    		  XMLElement tmp_propety = (XMLElement) em.nextElement();		              if (tmp_propety.getName().equals("x")) {		            	  try {							windowX = Integer.parseInt(tmp_propety.getContent());						} catch (NumberFormatException e1) {							windowX = 0;						}		              } else if (tmp_propety.getName().equals("y")) {		            	  try {		  					windowY = Integer.parseInt(tmp_propety.getContent());		  				} catch (NumberFormatException e1) {		  					windowY = 0;		  				}	                  }    	    	  }    		  }    	  }      }    }  }