Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

How do I determine the active window in a Java MDI application?

Updated on September 10, 2021

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:

  1. Create an automation to track the active window.
  2. Place the Created and Activated events of the window into your automation.
  3. Drag the Key property of the window into your automation as well.
  4. Add a string variable and grab its Value property and place into your automation.
  5. 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?

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us