• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Running an external application inside a Panel

 
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
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • 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...
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • 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.
 
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!