I'm trying to come up with a way that I can 'fake embedding' external windows program on top
of my Java GUI, for example, I'd like to display another GUI that was written in other language
on top of my GUI written in Java. When I move or re-size my Java GUI, the other GUI would also be re-sized according to the location of the Java GUI

I heard about getting windows handle object via JNI but I'm not familiar with JNI, so my question is, can I use this windows handle object to set the location or re-size my GUI that was not written in Java?

Is this possible?
Thank you very much!

August 9th, 2010, 11:12 AM

dlorde

Re: Fake embedding external program within Java GUI

Quote:

Originally Posted by holypromise

Is this possible?

I don't see why not. Doesn't mean it's worth doing.

If you cannot describe what you are doing as a process, you don't know what you're doing...
W. E. Deming

August 9th, 2010, 04:32 PM

holypromise

Re: Fake embedding external program within Java GUI

Quote:

Originally Posted by dlorde

I don't see why not. Doesn't mean it's worth doing.

If you cannot describe what you are doing as a process, you don't know what you're doing...
W. E. Deming

If there is any other ways to do this please tell!

Thank you very much.

August 10th, 2010, 05:01 AM

dlorde

Re: Fake embedding external program within Java GUI

Quote:

Originally Posted by holypromise

If there is any other ways to do this please tell!

I don't understand you - you asked if you could wrap another app using JNI so that app GUI size & position would be controlled by your Java app, and I said I think you can. I don't think you can do it without JNI, if that's what you mean.

Being abstract is something profoundly different from being vague... The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise...
E. Dijkstra

August 10th, 2010, 09:10 AM

holypromise

Re: Fake embedding external program within Java GUI

Quote:

Originally Posted by dlorde

I don't understand you - you asked if you could wrap another app using JNI so that app GUI size & position would be controlled by your Java app, and I said I think you can. I don't think you can do it without JNI, if that's what you mean.

Being abstract is something profoundly different from being vague... The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise...
E. Dijkstra

Oh I see, it's because you said it doesn't worth the effort, so I though may be there is
another, more efficient way to do it :(

August 11th, 2010, 06:50 AM

dlorde

Re: Fake embedding external program within Java GUI

I suggested that the possibility that it could be done didn't mean that it was worth doing because using JNI is a fair amount of work - unless you know what you're doing and have the necessary files available - and I've never come across a situation that really required this kind of thing. YMMV.

There are features that should not be used. There are concepts that should not be exploited. There are problems that should not be solved. There are programs that should not be written...
R. Harter