program interaction possible?
I'm wondering how (and if it's possible) to "interact" with other program-windows(possibly none-java programs) through java.
Lets say I'm running a program who has an window/GUI open and i want to get my hands on the info that a server sends to that window/GUI. My thought would be to have a java-program that "hocks" to that window by clicking on it or something rather then that i check what port it's using and there "hijacking" the info.
Any ideas or other better solutions to this? What i really want to know is how i interact/read info from other programs that are not build to interact with this program.
Big thanks for any help.