We help IT Professionals succeed at work.

swing and borland

gordon_guan
gordon_guan asked
on
1.I have used borland JBuilder personal version to create an applet program, since I don't want to use borland components, so just remove the com.borland.. package, and I use jdk to compile it, it compiles, but when I use html file to access the applet, I got an exception like this:
java.lang.InstantiationException: Applet1
     at com/ms/applet/BrowserAppletFrame.newInstance
     at com/ms/applet/AppletPanel.processSentEvent
     at com/ms/applet/AppletPanel.processSentEvent
     at com/ms/applet/AppletPanel.run
     at java/lang/Thread.run
How can I remove borland without accepting the applet?

2. When I use Jbuilder to build an applet, it can be run in jbuilder, but when I go to the directory and try to access the applet through the corresponding html file, I get a few exceptions, why it happens?

Comment
Watch Question

Commented:
Usually the borland vm drop this exception when you have applets with constructors which don't take parameters.
Change the compiler used by the JBuilder to one installed in the JDK. Seccond, you are runnung the applet using what ? Appletviewer (which one)? Try to set as DefaultRunnable the html file of the applet

Author

Commented:
I have solved this problem, it's because the browser default JVM dosn't support Swing component and some other advance features like jni, rmi etc. In order for the applet to work, Java plug-in is required and the original html page needs to be modified to use Java plug-in. But any way, thx for your help

Explore More ContentExplore courses, solutions, and other research materials related to this topic.