/** Action listener for the Buttons. */ public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); if (cmd.equals("ok")) { Truline.userProps.put("RecencyDays", recency.getText()); Truline.userProps.put("MaxDays", maxdays.getText()); Truline.userProps.put("MaxVariant", maxvariant.getText()); Truline.userProps.put("UseMaiden", maiden.getText()); Truline.userProps.put("BetFactorVersion", betFactorVersion.getText()); Truline.userProps.put("DATADIR", datadir.getText()); Truline.userProps.put("FontSize", fontsize.getText()); Truline.userProps.put("PrintProgram", printProgram.getText()); // Truline.userProps.put("Shell", shell.getText()); try { FileOutputStream out = new FileOutputStream("c:/truline2012/truline.ini"); if (Truline.userProps.getProperty("TL2013", "N").equals("Yes")) Truline.userProps.store(out, "Truline2013 configuration"); else Truline.userProps.store(out, "Truline2012 configuration"); } catch (Exception ef) { } // Make it affective m_gui.clear(); if (Truline.userProps.getProperty("DATATYPE", "DRF").equals("MCP")) { for (Enumeration el = m_gui.m_brisMCP.m_races.elements(); el.hasMoreElements(); ) { Race race = (Race) el.nextElement(); Handicap.compute(race); } GUIReport rpt4 = new GUIReport(); rpt4.generate(m_gui.m_filename, m_gui.m_brisMCP, m_gui, m_gui.m_raceNbr); } else { for (Enumeration el = m_gui.m_bris.m_races.elements(); el.hasMoreElements(); ) { Race race = (Race) el.nextElement(); Handicap.compute(race); } GUIReport rpt4 = new GUIReport(); rpt4.generate(m_gui.m_filename, m_gui.m_bris, m_gui, m_gui.m_raceNbr); } dispose(); } else if (cmd.equals("cancel")) { dispose(); } }