Skip to main content

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

Suggest edit 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.


Did you find this content helpful? YesNo

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us