Treatment of buttons in JFrame

0

I want to generate buttons in a frame, and that when I press a key, a button changes color.

For example: if I keep holding the "F" key, a button should light up in red, if I press the "L" key once, it should light up in yellow. My idea is to simulate the lights of a car. !!!

I hope my question is not a bit silly, I'm just starting and I do not know about it.

    
asked by J.Doe 13.11.2017 в 00:59
source

0 answers