Embed Swing App in .Net Application via a Window (form?)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • swebb99

    Embed Swing App in .Net Application via a Window (form?)

    Hi,

    Does anybody have any information on where I can find some details of
    how I would go about embedding an existing Java swing application into
    the window (form?) of a new .Net application on Windows.

    I'd like to take a useful existing java app which I work on day to day
    and allow users to view it in a new .Net app the company are working
    on.

    Is such a thing possible and if so how and what are the constraints
    (risizing ?, mouse/keyboard events ? .....)

    Thanks

    Steve
  • Peter Duniho

    #2
    Re: Embed Swing App in .Net Application via a Window (form?)

    On Tue, 24 Jun 2008 08:11:35 -0700, swebb99 <swebb99@gmail. comwrote:
    Does anybody have any information on where I can find some details of
    how I would go about embedding an existing Java swing application into
    the window (form?) of a new .Net application on Windows.
    >
    I'd like to take a useful existing java app which I work on day to day
    and allow users to view it in a new .Net app the company are working
    on.
    Do you need it to interact with your .NET application in any way other
    than being presented within it? If not, and if you can make the
    application an applet, then the easiest approach might be to do that and
    then embed it in a basic HTML page displayed by the WebBrowser control.

    Pete

    Comment

    • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

      #3
      Re: Embed Swing App in .Net Application via a Window (form?)

      swebb99 wrote:
      Does anybody have any information on where I can find some details of
      how I would go about embedding an existing Java swing application into
      the window (form?) of a new .Net application on Windows.
      >
      I'd like to take a useful existing java app which I work on day to day
      and allow users to view it in a new .Net app the company are working
      on.
      >
      Is such a thing possible and if so how and what are the constraints
      (risizing ?, mouse/keyboard events ? .....)
      I am afraid that you will need to keep them as two separate apps.

      It is possible to use Java code from .NET using the IKVM sofware,
      but IKVM does not support Swing, so it will not work for you (it
      does work fine for some other types of usage).

      Arne

      Comment

      • swebb99

        #4
        Re: Embed Swing App in .Net Application via a Window (form?)

        Do you need it to interact with your .NET application in any way other  
        than being presented within it?  If not, and if you can make the  
        application an applet, then the easiest approach might be to do that and  
        then embed it in a basic HTML page displayed by the WebBrowser control.
        >
        Pete
        Still not decided if it should interact or not but the applet idea
        seems like a possible way forward. There is an applet version of the
        app that interacts with Javascript, does .Net have anyway of receiving
        events from javascript ?

        Thanks

        Steve

        Comment

        • swebb99

          #5
          Re: Embed Swing App in .Net Application via a Window (form?)

          On 25 Jun, 00:27, Arne Vajhøj <a...@vajhoej.d kwrote:
          swebb99 wrote:
          Does anybody have any information on where I can find some details of
          how I would go about embedding an existing Java swing application into
          the window (form?) of a new .Net application on Windows.
          >
          I'd like to take a useful existing java app which I work on day to day
          and allow users to view it in a new .Net app the company are working
          on.
          >
          Is such a thing possible and if so how and what are the constraints
          (risizing ?, mouse/keyboard events ? .....)
          >
          I am afraid that you will need to keep them as two separate apps.
          >
          It is possible to use Java code from .NET using the IKVM sofware,
          but IKVM does not support Swing, so it will not work for you (it
          does work fine for some other types of usage).
          >
          Arne
          Thats a shame, I'll have a read about IKVM anyway as it might come in
          useful at some point.

          Thanks

          Steve

          Comment

          • Peter Duniho

            #6
            Re: Embed Swing App in .Net Application via a Window (form?)

            On Wed, 25 Jun 2008 00:49:11 -0700, swebb99 <swebb99@gmail. comwrote:
            Still not decided if it should interact or not but the applet idea
            seems like a possible way forward. There is an applet version of the
            app that interacts with Javascript, does .Net have anyway of receiving
            events from javascript ?
            Not that I know of. But I haven't used the WebBrowser control much. It's
            possible you could find something in that control that allows the client
            of the control to watch for things coming from Javascript.

            I'm far from being an expert in this particular area, so I don't really
            know much about what you can do. I _suspect_ that there's really no good
            support for integrating Java or Javascript with a .NET application, but I
            can't say that for sure.

            Pete

            Comment

            Working...