Code example for Preferences

Methods: put

0
    public String getSaveDir() {
        return saveDir;
    } 
     
    public void setOpenDir(String str) {
        pref.put("openDir", openDir = str);
    } 
     
    public void setSaveDir(String str) {
        pref.put("saveDir", saveDir = str);
    } 
     
    private static DirectoryCache instance = new DirectoryCache();
     
    public static DirectoryCache getInstance() { 
        return instance;
    } 
}