This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Applet with custom classes

Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im trying to run a swing applet running on Weblogic Server 6.0.
Ive set up the environment correct, I believe, because i can run simple swing applets (one file applet with a JLabel on it with text). However, when i try and run a complicated applet (multiple class files with custom classes) i get a "applet not initialized" error. The applet does run correctly through the "AppletViewer" so i believe the code is correct.
I just wonder if anyone has an idea on why this wouldn't work, with what i believe to be the problem -- My custom JPanel classes which i instaniate and add from my JApplet class.
Heres my APPLET TAG:
<TITLE>Service Order</TITLE>
<OBJECT CLASSID="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = 700
HEIGHT = 550
<PARAM NAME = CODE VALUE = "com.cambrian.serviceorder.applet.ServiceOrderApplet.class">
<PARAM NAME=CODEBASE VALUE="/classes/ServiceOrderENT@ServiceOrderWEB/">
<PARAM NAME = ARCHIVE VALUE = "ServiceOrder.jar">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="scriptable" VALUE="false">
<EMBED type="application/x-java-applet;version=1.3"
CODE = "com.cambrian.serviceorder.applet.ServiceOrderApplet.class"
CODEBASE = "/classes/ServiceOrderENT@ServiceOrderWEB/"
ARCHIVE = "ServiceOrder.jar"
WIDTH = 700
HEIGHT = 550
pluginspage=" ll.html";>
alt="Your browser understands the <APPLET>
tag but isn't running the applet, for some reason.
"Your browser is completely ignoring the <APPLET> tag!
Kevin Sullivan
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok after some trial and error I've limited it down to the problem.
First the source of the error is in the use of an ImageIcon object. In testing i gave it a relative URL to the current working directory. And it worked great in the applet viewer. I had heard that in order to use it in an applet it needs to be located in the classpath which is was but that doesnt seem to be working through the browser. So, i loaded the image on to an IIS server and put the URL for the ImageIcon to a fully qualified HTTP URL though this still works great in the "appletviewer" it fails as an applet viewed through IE5+. The IIS is running on a different box so i dont know if its a permission thing with the applet or what.
Thanks for any help.
Kevin Sullivan
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well for those of you following this thread.. and judging by the haven't, its come full cycle.
Once i found it was the ImageIcon causing the problem i did a search and found this thread which was most helpful and now my complex applet works correctly.
As a side note i just wanted to say this forum might not have the most talkative bunch but hell it let me think out loud and work through my problem ;-)
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been following your posts. And I conscientiously decided to give it a day before jumping in the pool of trial-and-error with you. JavaRanchers figure out their own problems a lot - we're a bright group. Thanks for sharing your problem and its solution.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic