473,761 Members | 4,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jun 27 '08 #1
5 2521
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
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
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
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
Jun 27 '08 #5
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6421
by: Joseph | last post by:
hi 1) i plan on having an awt canvas component (to draw graphs) on a JFrame with other swing components..will this be okay? i've read that swing and awt aren't compatible.. 2)Also, if i have a function which simply loops infinately that is part of a form, what happens when a form event (eg button click) occurs? will the event handler be executed simulatanesouly with the loop? or does the event excecute first and then the loop is...
0
2980
by: Ney André de Mello Zunino | last post by:
Hello. I have decided to look again at Java after a *really* long break. While browsing through the Swing tutorials , I noticed that the basic skeleton of the demo applications had something new. There is now a concern with thread-safety which is illustrated by the use of the SwingUtilities.invokeLater() method for the GUI manipulation code. In the demos, the private static method which is responsible for setting up the GUI...
2
1968
by: Raghavendran Muraleetharan | last post by:
I am having an existing VB 6 standard .EXE application. Now I am developing a wrapper application in .Net and I want to launch the VB 6 exe app embedded with in the .Net App window. That is, the standard EXE application should be activated in-place within the .Net window and should be confined within the ..Net app window. Any suggestions on how I go about doing this stuff? This is a repeat post for the new visitors.
1
2101
by: Udi | last post by:
Hi All, I need to embed the ethereal process inside my .NET app. ( http://www.ethereal.com ) I assume the best solution would be getting hands on the ethereal main window form and host it in my app. (BTW - unmanaged code...) However, I'm not sure how easy it is or even if its possible, so I was thinking about launching the ethereal process from my application and "just" displaying it's main form in one of my application's panes. (My app...
7
12113
by: ScottH | last post by:
Curious how you could embed a console in a Windows form.. any ideas ?
1
3085
by: requeth | last post by:
I'm trying to embed a command window in a form in VB.NET. I remember back in the old days there was a button in the IDE to add the window, and I never really learned how it worked. I just downloaded Visual Basic 2008 Express Edition and the button no longer exists. Does anyone know how to initialize and embed a command window into a form or control of some sort? Thanks.
6
51167
by: r035198x | last post by:
I have put together this article to give people starting Swing an awareness of issues that need to be considered when creating a Swing application. Most of the Swing tutorials that I have seen just help people display some nice widgets quickly without explaining some issues that need to be tackled when a full application needs to be developed. This article does not go into full implementation details because those can be found by reading the...
8
5693
risk32
by: risk32 | last post by:
Hi all. I have a really confusing problem. I'm using Swing and I'm trying to do a confirmation box : int reply; String message = "Do you want to input another number?"; String title = "Input Another Number?"; reply = (JOptionPane.showConfirmDialog(null, message, title, JOptionPane.YES_NO_OPTION); if (reply == JOptionPane.NO_OPTION) { System.exit(0); } This part works great, now down to business:
2
8087
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I did not understand some parameters totally in the HTML tag. These days when I was surfing the Internet I have found some comprehensive introduction to these two tags. I read it and conclude it with my own words; I think it will be useful to us, so I...
0
9538
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9353
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9975
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9909
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9788
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8794
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6623
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5241
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.