LinkedIn
Copied!

Table of Contents

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:

  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.

 

Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

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