dude.....you are passing buttons as key and value....but searching for integer...
also....i don't think while loop here can give you desired results...
btw...why is panel p1 used??