im not sure but try to use pater
for enter password use


boolean b=true;
while(b){ ...
if (pass.leght>6; b=false;)
}