Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Retrieve coordinates of other windows

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Retrieve coordinates of other windows

    I've been Googling this for about an hour with no luck. I have absolutely no idea where to start. What I need is to find the coordinates of a specific window (one that is NOT part of the Java program) and be able to assign them to a integer. Right now I don't think it's possible, but if anyone knows how, I would much appreciate it if you could explain it.


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Retrieve coordinates of other windows

    Java programs don't have access to external processes (except for streams from processes created by your java program). The only solution here is JNI (or JNA. Though I've personally never used this, it's suppose to make linking Java and native code easier).

    If you had access to the other program's source code you could get that program to open a socket which you could use to communicate between your Java program and the other program.

Similar Threads

  1. Java graphic coordinates out of bounds?
    By jnmcneel in forum What's Wrong With My Code?
    Replies: 4
    Last Post: May 24th, 2011, 03:28 PM
  2. [SOLVED] First assignment, clueless student, involving coordinates and distances
    By Kerrigan in forum Java Theory & Questions
    Replies: 7
    Last Post: March 10th, 2011, 04:52 PM
  3. arraylists to store coordinates for a snake applet
    By finalfantasyfreak15 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: February 19th, 2011, 10:21 PM
  4. [HELP] How can I retrieve attribute/method?
    By k4it0xtr3me in forum Object Oriented Programming
    Replies: 0
    Last Post: January 21st, 2011, 02:18 AM
  5. Program that will retrieve information from website.
    By minaru in forum Java Theory & Questions
    Replies: 2
    Last Post: December 18th, 2010, 05:50 PM