Fake embedding external program within Java GUI
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Fake embedding external program within Java GUI

Hybrid View

  1. #1
    Join Date
    Apr 2010
    Posts
    10

    Smile Fake embedding external program within Java GUI

    Hi,

    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!

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: Fake embedding external program within Java GUI

    Quote Originally Posted by holypromise View Post
    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
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  3. #3
    Join Date
    Apr 2010
    Posts
    10

    Re: Fake embedding external program within Java GUI

    Quote Originally Posted by dlorde View Post
    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.

  4. #4
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: Fake embedding external program within Java GUI

    Quote Originally Posted by holypromise View Post
    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
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  5. #5
    Join Date
    Apr 2010
    Posts
    10

    Re: Fake embedding external program within Java GUI

    Quote Originally Posted by dlorde View Post
    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

  6. #6
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    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
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center