• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

how to load powerpoint presentation in java applet

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

In my java application i am including an image in my applet by browsing through a dialog box, which can browse the image from my system wherever it is present. For example in c: drive or d: drive......

Same way if I want to browse power point presentations and want to display it on the applet, how can i do that?

I have searched a lot.
But found nothing.

Anybody has any idea please tell me.
Regards,
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

In my java application i am including an image in my applet


I'm confused - is this an applet or an application? This matters because applets run under security restrictions that won't allow them to perform file I/O unless the applet is signed or the local security policy altered (you can find more about that here).

You would use the java.awt.FileDialog or javax.swing.JFileChooser classes to browse for files.

The hardest part would be to display PPT files. I'm not aware of an AWT or Swing component that can do that. It's not hard to read PPT files with the help of the Apache POI library, though. It lets you extract slide titles, text, images, notes and other information for each slide. You'll just have to display those in a meaningful way in the applet.
 
Khushwinder Chahal
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ulf Dittmer,
Thanks for your reply.
I apologize for not making myself clear.
Its an applet actually.
In my applet i have a canvas for displaying the images.
Now i want to display the ppt file in this canvas.
Is it possible or not?
I did not find any appropriate solution for this on the net.
Regards,
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't display it in the way you can display an image, because there's nothing in the class libraries that understands PPT files.

But as I said, it's not hard to use POI to read PPT files and iterate through their contents, displaying the slides' contents as appropriate. (If you want to show transitions etc. it gets a whole lot more complicated, of course.)
 
Khushwinder Chahal
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Ulf Dittmer.
Regards
 
Beware the other head of science - it bites! Nibble on this message:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic