Java FX Scene Builder How to make event key pressed
<p>I'm new in Java and Java FX and I'm trying to make a panel with buttons using scene builder. I want my application to respond only on arrow key pressed. I made the following method in my <code>Controller</code> class:</p>

<pre><code>public void keyPressed(KeyEvent key) {
    switch(key.getCode()) {
        ...some code here
    }
} 
</code></pre>

<p>After that I selected this method in scene builder, but when I run my application nothing happens when I press an arrow key. 
Can somebody help me?</p>