public static void setLastPath ( String lastPath ) { File file = new File ( lastPath ) ; if ( ! file . isDirectory ( ) ) { lastPath = file . getParentFile ( ) . getAbsolutePath ( ) ; } Preferences preferences = Preferences . userRoot ( ) . node ( GuiBridgeHandler . PREFS_NODE_NAME ) ; preferences . put ( LAST_PATH , lastPath ) ; }
Save the passed path as last path available .