I am working on a calculator and I am almost done. The last step I want to manage is to use the calculator with my numpad. My idea was to use Keylisteners but my problem is, anytime I press a key, it is always the same button which responds to all of the keys, because the focus is always on this button. When I click with my mouse on another button the focus is set on this one and now everytime I press a key, this button responds to all the keys.
My question is, how do I change the focus everytime I press a key?