This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to refer a child window in a MDI application? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to refer a child window in a MDI application?" Watch "How to refer a child window in a MDI application?" New topic
Author

How to refer a child window in a MDI application?

Praveen Kumar Jayaram
Ranch Hand

Joined: Jul 14, 2008
Posts: 54
Hi

I have a Multiple Document Interface (MDI) application written in FORTRAN. It has two child windows, one for displaying some data and another for displaying a trend (graphs).

My problem is I will be knowing only the PID of the above mentioned process from Java end.

How to refer the child window which is displaying data and read the data from it using Java??
I did implemented the above mentioned requirement with normal console application (with no child windows). But it is a window based MDI application now.

Please help.
[ October 13, 2008: Message edited by: Praveen Kumar Jayaram ]

Praveen
Praveen Kumar Jayaram
Ranch Hand

Joined: Jul 14, 2008
Posts: 54
Please someone help for this problem.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19556
    
  16

I don't think there are many people who know any answer to this problem. I certainly don't.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Praveen Kumar Jayaram
Ranch Hand

Joined: Jul 14, 2008
Posts: 54
Do you think is that possible to implement anyway??
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 347
Are you trying to do a screen scrape? Try google with "screen scraping java".

Have a look at this link as well.
Praveen Kumar Jayaram
Ranch Hand

Joined: Jul 14, 2008
Posts: 54
Thanks for your reply.

I am not doing screen scraping.
Actually the process prints out some numbers and text onto screen. I have to read the data printed by the process on the screen and apply some bussiness logic on that. This was simple for a console application by using Java's Process class and getting the input stream of the process.

But the present app is MDI, I am not getting how to point the child window to read the data just by knowing the parent window process id.
Can I track the threads (child windows) inside the MDI app?

Any suggestion for this?
Thanks in advance
[ October 15, 2008: Message edited by: Praveen Kumar Jayaram ]
Matteo Di Furia
Ranch Hand

Joined: Jun 20, 2008
Posts: 102
I don't know if what you are trying to do is possible at all, but if I were you I'd look for some sort of interaction between Fortran and Java (which is surely possible), then I'd check if MDI application has some sort of methods to get/export data somehow (something like public interfaces to external input/output). I highly doubt you can get some data simply starting from the PID of the application process (it would be quite worrying, if you ask to me), although of course I'm not completely sure on this.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

I guess there isn't a platform-independent way to get a PID. So my first question is, what is your platform?

Linux, MacOs, Windows?

Anyhow wouldn't that knowledge enable me to help you further.


http://home.arcor.de/hirnstrom/bewerbung
Praveen Kumar Jayaram
Ranch Hand

Joined: Jul 14, 2008
Posts: 54
Thanks for replying friends.
I am working on Windows XP, Service Pack 2.
g Peshone
Ranch Hand

Joined: Oct 20, 2008
Posts: 44
Store the data in DB, create a temp �db� on the fly, and then extract the data into Java with Java.
Praveen Kumar Jayaram
Ranch Hand

Joined: Jul 14, 2008
Posts: 54
Thanks.
We are not using any DB here.
Anything like IPC mechanism or memory map possible?
David Balažic
Ranch Hand

Joined: May 15, 2008
Posts: 86
You could use pipes.
Or simply temporary files.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to refer a child window in a MDI application?
 
Similar Threads
internal frames and windows look and feel
How to close all child windows from parent window
Maximizing a window in Java Swing
closing all windows spawned from a frame
Mdi child form