I’m a rookie at this. I’m trying to pick up values from the hat of my joystick. So I have code like:
Component comp = event.getComponent();
if (comp instanceof Component.POV || comp instanceof LinuxJoystickPOV) {
System.out.println(" is hat");
}
This works, but if the test is jut for the Component.POV, it fails.
if (comp instanceof Component.POV ) {
System.out.println(" should still be a hat");
}
What is the preferred way to check this?
Thanks
pat