Auto Focus or Locked Cursor

Is there a way to force the cursor into a Text Field automatically when the Client starts up? We have a Text Field that is being used as a Barcode Scan Field and the operator has to use the mouse to click their cursor into the Text Field before they can start scanning. Is there a way to automatically move the cursor into the Text Field? Or is there a way to keep the cursor “locked” in a Text Field so that it’s always there? Thanks!

Sure, put the following script on the internalFrameActivated event of the window:event.source.rootContainer.getComponent("ComponentName").requestFocusInWindow()It forces the component to get focus upon opening the window.


Awesome! Thank you!