• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Running external apps in a JFrame?

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on a project for work and need to know if it is possible to run external applications, such as Windows Media Player, etc. in a JFrame or JInternalFrame? Also, if this is possible will it treat the frame area as "Full Screen" when the media player is placed in full screen mode?

Right now just trying to see if this is possible before I spend a great deal of time researching it.
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Swing does support Full Screen Exclusive Mode, but wrapping applications will require JNI code to interface with the current Window Manager.
 
Bryan Scarbrough
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nick, Thanks for the quick reply! I figured Swing would not support it natively and I think I have found a way around my problem anyway, but in the meantime...

How difficult is it to learn JNI (for someone who has not programmed Java in a while)? Any good tutorials or books?

Thanks again!
 
Nick Meverden
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bryan,

check out http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html

But JNI is a bear, and garrentied you will not have fun. Plus you will lose platform independence as your code will be targeted towards one OS, using one Window Manager.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure if this is helpful - i.e. if you need to run external apps other than Windows Media Player - but if you just need to play various movie formats - you can use JMF.

If it is the case that you need to embed all kinds of other windows applications in your app - you may want to look at using SWT rather than Swing - SWT provides some ActiveX bindings that may help you further than direct JNI.
 
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic