protected String findUserFromPassword() 
	{
		//find user bases on password
		//using Random Access File Class
		try
		{
			RandomAccessFile readFile = new RandomAccessFile("Info.dat","rw");
			RandomAccessFile numberOfVaribles = new RandomAccessFile("n.dat","rw");
			readFile.seek(0);
			numberOfVaribles.seek(0);
			int loopLimit = numberOfVaribles.readInt()/2;
			for(int i=0;i<loopLimit;i++)
			{
				String userTemp = readFile.readUTF();
				int passwordTemp = readFile.readInt();
				if(passwordTemp==password)
				{
					UserName = userTemp;
					break;
				}
				else if(userTemp==null)
					loopLimit++;
			}
			readFile.close();
			numberOfVaribles.close();
		}
		catch(FileNotFoundException e)
		{
			JOptionPane.showMessageDialog(null, "File Not Found!");
		}
		catch(IOException e)
		{
			JOptionPane.showMessageDialog(null, "IO Exception");
		}
		return UserName;
	}