Strange, The problem is probably related to my b4a code as your code does work in B4A.
Agraham, You have been a really great help for me and this topic is probably ended. Sorry for some of my dumb questions, although I really am getting java now.
Thank you very much,
XverhelstX