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 max
You can use the Windows API to get a handle to the window and then resize it:
EnumWindows:
http://msdn.microsoft.com/en-us/library/ms633497%28v=VS.85%29.aspx
GetNextWindow:
http://msdn.microsoft.com/en-us/library/ms633509%28v=VS.85%29.aspx
GetWindowText: (to decide whether that is the window you want; if title matches)
http://msdn.microsoft.com/en-us/library/ms633520%28v=VS.85%29.aspx
FindWindow: (for this you need the exact title beforehand, not just part of it)
http://msdn.microsoft.com/en-us/library/ms633499%28v=vs.85%29.aspx
ShowWindow:
http://msdn.microsoft.com/en-us/library/ms633548%28v=VS.85%29.aspx
Typical WinAPI interface, a little clunky to use but powerful.