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: how to specify location of opened window

  1. #1
    Member
    Join Date
    Apr 2013
    Posts
    83
    Thanks
    7
    Thanked 3 Times in 3 Posts

    Default how to specify location of opened window

    hi i am writeing a small app to automate some actions on my computer this requires me to open an application and click on a button i am using
    Process child0 = Runtime.getRuntime().exec("/home/user/application");to do this. The problem is every time it opens at a different lcation on the screen so i cannot click on it using the robot class due to x,y coordinates being different every time. with selenium you can use .setlocation(x,y) method but how can this be done for other applications.

    any help or ideas would be great thanks


  2. #2
    Member
    Join Date
    Apr 2013
    Posts
    83
    Thanks
    7
    Thanked 3 Times in 3 Posts

    Default Re: how to specify location of opened window

    there are tools to override gnome desktop environment however i overcame the problem by using robot class to hit tab a number of times until i found the button and then click..

    just posting on case it is of help to others

Similar Threads

  1. Eclipse runs not the opened class! Why? :S
    By Zoli in forum Object Oriented Programming
    Replies: 3
    Last Post: August 19th, 2013, 08:10 AM
  2. Applet viewer window is diplaying in fron of the current window every time
    By jsreddy99 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 24th, 2013, 07:16 AM
  3. Replies: 2
    Last Post: August 27th, 2012, 09:19 PM
  4. Saving current state of GUI to be opened later
    By captain in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: April 26th, 2012, 03:29 PM
  5. Replies: 1
    Last Post: December 17th, 2011, 03:32 AM