[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Controlling another window on the screen

Posted on 2006-05-30
11
Medium Priority
?
208 Views
Last Modified: 2010-03-31
Say I have Java program running (not my program nor do I have source for it), How can I interact with the window with my Java program?

What I am trying to do is to fill in information into another Java window when it opens (from a different program). So window X opens and then (this program) fills in the information into the field (lets call the field first name) and clicks send. (then waits for the X window to re-open) And it just keeps doing this... ( wait, fill, wait, fill.... )

Please include code (examples)
0
Comment
Question by:JoshWegener
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 15

Expert Comment

by:Javatm
ID: 16791967
You can use JFrame and JInternalFrame or JDailog which ever you prefer and do an ActionListener and add whatever you like to do with the information.
0
 
LVL 24

Accepted Solution

by:
sciuriware earned 2000 total points
ID: 16792000
No you can't.

I know on Windows there is a C# (or C++) trick, but not open to JAVA!

;JOOP!
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 16792008
Javatm, he's talking about 2 programs!!!
;JOOP!
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 1

Author Comment

by:JoshWegener
ID: 16792113
Well I guess I could to it in C++....

OH (idea)

the window opens at the same position every time... is there away for Java program to control the mouse? (move to x,y, click, type, move x,y, click) I would still need to know when the window opens....
0
 
LVL 15

Expert Comment

by:Javatm
ID: 16792129
Ow if thats the case sciuriware is correct.
0
 
LVL 15

Expert Comment

by:Javatm
ID: 16792157
You can try JNI but that will be a tough one.
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 16792302
... and if security is set, it will still fail.
No chance on XP or LINUX.

;JOOP!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16792375
As an alternative to JNI you could load the class in your client program and then try to break its encapsulation with reflection
0
 
LVL 15

Expert Comment

by:Javatm
ID: 16792410
> As an alternative to JNI you could load the class in your client program and then try to break its encapsulation with reflection

True for some but not for all. Well designed applications doesnt give a chance.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16792425
>>Well designed applications doesnt give a chance.

How so?
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 16794009
Sorry, sometimes the right answer is disappointing .............
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month9 days, 19 hours left to enroll

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question