By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,827 Members | 813 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,827 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jun 27 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Tue, 24 Jun 2008 08:11:35 -0700, swebb99 <sw*****@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
Jun 27 '08 #2

P: n/a
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
Jun 27 '08 #3

P: n/a
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
Jun 27 '08 #4

P: n/a
On 25 Jun, 00:27, Arne Vajhøj <a...@vajhoej.dkwrote:
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
Jun 27 '08 #5

P: n/a
On Wed, 25 Jun 2008 00:49:11 -0700, swebb99 <sw*****@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
Jun 27 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.