Programming with freedrive and normal mode (JAVA Swing)

Hello Everyone,

We have created a URCap for our gripper. We have programmed it so that the we can work with freedrive mode too. Now the problem is, we are unable to detect that when is the freedrive mode enabled or disabled. Even if its enabled it just shifts to normal mode. We would like to have information about how is the free drive mode running? also examples for programming with freedrive mode should help. We have programmed our URCap with Java swing.
Please excuse me if its a very simple question. Let me know if there are any documents or examples with freedrive mode to refer.
Looking forward for your replies. Thanks a lot for the time.