@@ -0,0 +1,947 @@
+package bcgTree.gui;%0A%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileOutputStream;%0Aimport java.util.Properties;%0A%0Apublic class SettingsFileHandler %7B%0A%0A%09private static String settingsFileName = System.getProperty(%22user.home%22) + %22/.bcgTree%22;%0A%0A%09public static void saveSettings(Properties props)%7B%0A%09%09if(props == null)%7B%0A%09%09%09return;%0A%09%09%7D%0A%09%09File settingsFile = new File(settingsFileName);%0A%09%09FileOutputStream fos;%0A%09%09try %7B%0A%09%09%09fos = new FileOutputStream(settingsFile);%0A%09%09%09props.storeToXML(fos, %22global bcgTree settings%22);%0A%09%09%09fos.close();%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%7D%0A%0A%09public static Properties loadSettings() %7B%0A%09%09File settingsFile = new File(settingsFileName);%0A%09%09if (!settingsFile.exists()) %7B%0A%09%09%09return null;%0A%09%09%7D%0A%09%09FileInputStream fis;%0A%09%09Properties p = new Properties();%0A%09%09try %7B%0A%09%09%09fis = new FileInputStream(settingsFile);%0A%09%09%09p.loadFromXML(fis);%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09return null;%0A%09%09%7D%0A%09%09return p;%0A%09%7D%0A%7D

Add SettingsFileHandler as helper class