• Post Reply Bookmark Topic Watch Topic
  • New Topic

Running an external application inside a Panel

 
kapil Gupta
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to run a separate process inside a Swing panel. However, the swing and process communicate through sockets. Is it possible to display and run an executable having its own GUI window, within a panel?
Thanks,
Kapil
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No... you can only put Java components inside another Java component...

You could kick off an external program from commands issued from components in a JPanel(using the Runtime class), but you can't display this program inside the JPanel...
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as Swing, Nathan is right (as always). If you wanted to though, you could use SWT which is IBM's Standard Widget Toolkit. It has ActiveX and OLE Interfaces to do what you want.
Drawbacks are System Dependencies of course. And you have to drop a DLL on every client PC that runs the software in addition to the regular JVM. It is a desent API though. And tends to be a little faster than SWING because it works more like AWT in that it let's the OS draw the Widgets rather than the API drawing it themselves. You can find out more about SWT at www.eclipse.org.
Have fun.
 
raj madhuram
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can make the app a OCX control, you can bring it within a Java panel using the following:
http://www.codeproject.com/java/javacom.asp
commercial product j-integra
http://www.linar.com/jintegra/doc/ocx/
http://nexus.cs.usfca.edu/~webtop/misc/misc.html

hope that helps,
Raj
 
kapil Gupta
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies!!
I have an application exe and also its ActiveX Automation Server(exe). Can I put this Automation exe in Swing panel using JavaCom bridge?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!