Set the Attached Text Radius for Java Objects
Source code
'************************************************************************************************************************
'Description:
'
'This example opens UFT and configures its Java options.
'
'Assumptions:
'There is no unsaved test currently open in UFT.
'For more information, see the example for the Test.SaveAs method.
'************************************************************************************************************************

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtJavaOptions 'As QuickTest.JavaOptions ' Declare the Java Options object variable

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.SetActiveAddins Array("Java") ' Load the Java Add-in
qtApp.Launch ' Start UFT
qtApp.Visible = True ' Make the UFT application visible
Set qtJavaOptions = qtApp.Options.Java ' Return the Java Options object

' Configure the Java options
qtJavaOptions.RecordListByIndex = False 'Record list items by name
qtJavaOptions.RecordComboByIndex = True 'Record combo box selections by index
qtJavaOptions.RecordTreeByIndex = False 'Record tree node selection by name
qtJavaOptions.RecordTabByIndex = False 'Record tab selections in tabbed pane controls by name
qtJavaOptions.AttachedTextRadius = "100" 'Look for the components' attached text within a 100 pixels radius
qtJavaOptions.AWTEventModel = "Auto" ' Enable QuickTest to automatically select the model for sending events to objects
qtJavaOptions.AnalogTableRecording = True 'Record table operations in analog mode

Set qtJavaOptions = Nothing ' Release the Java Options object
Set qtApp = Nothing ' Release the Application object