private void readProperties() { Properties props = new Properties(); try { props.load(new FileInputStream("display.properties")); } catch (FileNotFoundException e) { return; } catch (IOException e) { e.printStackTrace(); return; } String value; if ((value = (String) props.getProperty("NextSlideTimeout")) != null) { try { int val = Integer.parseInt(value); System.out.println("NextSlideTimeout=" + val); slidePane.setNextSlideTimeout(val * 1000); } catch (NumberFormatException e) { System.err.println("Bad NextSLideTimeout value " + value); } } if ((value = (String) props.getProperty("TelephoneNumberFont")) != null) { telephoneNrFontName = value; } if ((value = (String) props.getProperty("PledgeFont")) != null) { pledgePane.setFont(value); } if ((value = (String) props.getProperty("PledgeFontSize")) != null) { try { int val = Integer.parseInt(value); pledgePane.setFontSize(val); } catch (NumberFormatException e) { System.err.println("Bad PledgeFontSize value " + value); } } if ((value = (String) props.getProperty("TickerFont")) != null) { tickerLabel.setFont(value); } if ((value = (String) props.getProperty("TickerFontSize")) != null) { try { int val = Integer.parseInt(value); tickerLabel.setFontSize(val); } catch (NumberFormatException e) { System.err.println("Bad TickerFontSize value " + value); } } if ((value = (String) props.getProperty("NextPledgeTimeout")) != null) { try { int val = Integer.parseInt(value); System.out.println("NextPledgeTimeout=" + val); pledgePane.setNextPledgeTimeout(val * 1000); } catch (NumberFormatException e) { System.err.println("Bad NextPledgeTimeout value " + value); } } if ((value = (String) props.getProperty("TickerHz")) != null) { try { int val = Integer.parseInt(value); System.out.println("TickerHz=" + val); tickerLabel.setTickerHz(val); } catch (NumberFormatException e) { System.err.println("Bad TickerHz value " + value); } } if ((value = (String) props.getProperty("TicksPerSecond")) != null) { try { int val = Integer.parseInt(value); System.out.println("TicksPerSecond=" + val); tickerLabel.setTicksPerSecond(val); } catch (NumberFormatException e) { System.err.println("Bad TicksPerSecond value " + value); } } if ((value = (String) props.getProperty("PledgeInstruction")) != null) { System.out.println("PledgeInstruction=" + value); phoneNumber = value; } }