• 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

JApplet converted to Web Start application

 
Ranch Hand
Posts: 191
Netbeans IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I created a JApplet which can display a catalogue of images which are navigated via a CardLayout using the left and right arrow keys of the user's keyboard. It was created for FireFox under Windows Vista. I need to use Webstart to have it run properly with Internet Explorer under Vista.
I therefore converted the JApplet code to a JFrame. The application launches from my web server except the icon in the JFrame and the images do not display.





The line beginning with Toolkit is where the problem is. I cannot use the same code as in the JApplet to retrieve the images because I now have a JFrame.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I think Toolkit is only usable in applets. You can use the javax.imegio.ImageIO class to read files from an URL. That will hand you a BufferedImage object, which can be used wherever an Image can be used (and, as a bonus, in a few other places as well).
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's a quote from the Web Start tutorial:

Java Web Start provides limited support for applets through its built-in applet viewer. However, this is not intended to be a full- scale applet environment, such as the one provided by Java Plug-in. Java Web Start's applet viewer has certain limitations; for example, you cannot specify class files as resources, and it does not accept policy files.


So, Web Start does have some support for applets, at least in the most recent versions. I don't know whether this helps your particular situation or not.
 
Be reasonable. You can't destroy everything. Where would you sit? How would you read a tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic