Results 1 to 2 of 2
Thread: find a window
- 07-05-2012, 05:48 AM #1
Member
- Join Date
- Jul 2012
- Posts
- 1
- Rep Power
- 0
find a window
I am making a program that helps me play hearts, cus I'm board, and have a question. Yes I'm fairly new to java so I think this is the right forum subsection. My question is: The program I am making needs to find the cards and get what cards I have in my hand. The way I was thinking about doing it is:
1. find the harts game window
2. get the origin or (x, y) coordinates of that window
3. find the cards using a screenshot
my problem with the above is:
How do I get my program to automatically find the harts game window and get its origin? The window is open as the game is running.
-
Re: find a window
If you're talking about getting the coordinates of another program that you're running, then you can't do that with just core Java and will require some OS calls. This will require JNA (Java Native Access) or JNI (Java Native Interface). For more on these guys, please check Google.
Similar Threads
-
Closing secondary window from button in primary window
By KoncentriK in forum New To JavaReplies: 4Last Post: 02-26-2012, 02:24 AM -
how to disable the parent window when child window is open
By ayushi in forum Java ServletReplies: 1Last Post: 07-25-2011, 11:24 AM -
How to find the active Window in Swing?
By akcasoy in forum AWT / SwingReplies: 16Last Post: 06-26-2010, 06:33 PM -
Need to pass a value from a parent window to a pop up or child window
By blackpanther in forum Advanced JavaReplies: 4Last Post: 01-10-2010, 08:48 AM -
change url in parent window from child window
By rakesh_n_mehta in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 07-09-2009, 01:17 PM
Bookmarks