0
How can i handle events on a Joystick?
The controller is detectable, can even print out the "getName()" of each component. I want certain/ specific events to occure when a button is pressed or released..
4 Answers
+ 2
I believe you are looking for the Event Container and multiple buttons similar to the construction I found via stackoverflow... not to be misconstrued with the Javascript set up. The user asking actually has a nicely structured Java code and just needed a simple fix.
https://codereview.stackexchange.com/questions/203642/event-handling-gamepad-in-java
+ 1
Are you working with swing or javaFX?
+ 1
tutorial about event handling:
https://www.tutorialspoint.com/swing/swing_event_handling.htm
stackoverflow question about joystick events in java
https://stackoverflow.com/questions/31279716/joystick-event-in-java
Hope this helps :)
0
Working with java swing