Can you clearly explains what your application should do ?
What I understand from your explanations is that through your Java application :
- some folders must be visible ;
- when the user try to access one of the these visible folders, the user will required to enter password information;
- If the password information is not correct, the folder becomes invisible.
Is a password required to access a folder EACH TIME a folder is accessed ?
Has each folder a different password ?
Where are the password information stored : in your application or associated with the folders and obtained through the OS ?