How do I determine the active window in a Java MDI application?
In Java MDI applications, the Active key is not available to let you operate on the active window. To work around this limitation of Java, follow these steps:
- Create an automation to track the active window.
- Place the Created and Activated events of the window into your automation.
- Drag the Key property of the window into your automation as well.
- Add a string variable and grab its Value property and place into your automation.
- Connect both the Created and Event and the Activated event to the Value property of the automation and pass the Key property from the window into the blue data path. You can use this variable to determine what the last activated window is.
Previous topic How do I detect when a Windows form is being closed? Next topic How do I interrogate web applications in Windows 10 and Windows Server 2016?