[Java] gui keyboard listeners

Associate
Joined
23 Aug 2004
Posts
1,493
Hi,

I've got a gui with 4 progress bars. The values for the progress bars change randomly. I am able to change the value of the progress bar using radio buttons to select the correct bar and then entering the value using a text field and button. Problem is I need the input to be made within 3 seconds of a value changing which is tricky using this method. Ideally there would be no text areas and radio buttons.

Is it possible to use a keyboard listener to select the correct bar and enter the value? For example. press 'p' for the power, then 30 to set the value and then press return to set the value?

Have looked at the api, not having much luck

Many thanks
 
Back
Top Bottom