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

Swing Components and Runnable Interface

Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I have 2 questions to be clarified:
1) I have a netscape 4.7 and IE 5.0. When I try to run a JApplet in the browser, the "ClassNotFound" exception for JApplet is coming whereas the same program runs perfectly in AppletViewer. How to solve it?
2) I have tried a code Runnable r= new Runnable() and it runs perfectly fine without in compilation and runtime error. I am confused by the fact that this statement violates the rule that interfaces cannot be instantiated directly. This works for only the Runnable interface and not any other interface.
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With due respect to your concerns, please do not post Swing related issues in this board. After all they are not a part of certification objectives. I am sure JavaRanch has another appropriate board for Swing related queries.
For your question regarding Runnable interface, could you please post your code here so that we know exactly what you are doing?
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is better for the swing forum, but I'll take a shot at it while it's here!
Swing components are not part of the standard 1.1 release - which common browsers are based on. To get it to run in a IE or Netscape browser, you need to either load the 1.2 plug-in on your browser, or put the swing .jar file in the class path of the browser. AppletViewer must be aware of the jar file in some way - it may even be part of the release, I don't know.
You don't like waffles? Well, do you like this tiny ad?
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic