title: Handle external windows using java
body: <p>I need to check if an external window (another java program, but not controlled by the program that I'm working on) is open using the title, and if it open, then either maximize or minimize it based on the user command in Java (I know only the title of the window and nothing else) . Google only says that I can use <code>winapi</code> to get the window handle and manipulate it using the handle, but I'm not able to find how to do this.</p>
  
  <p>I could find references on how to do it using JNI here:
  <a href="https://stackoverflow.com/questions/386792/in-java-swing-how-do-you-get-a-win32-window-handle-hwnd-reference-to-a-window">In Java Swing how do you get a Win32 window handle (hwnd) reference to a window?</a>. Is it possible to do this without using JNI?</p>
  
  <p>Could someone help me understand how to do this.</p>
  
  <p>Thanks and Regards </p>