I am using Netbeans 7.3, JRE 1.7.0_11, Java SE 7 update 40, on Mac 10.8.5.
I have created a JApplet GUI form which I have embedded in a applet tag within a HTML doc,
which I have created in a Java Wed application.
We I try to run in Safari I get the following error:
I have searched the net found that some people resolved this error by changing :
Prefernecs-Java-GUI Builder - Layout Generation Style from Automatic to Swing Layout Extension Library. (from Automatic)
But I am still getting the same error.
Any feedback appreciated.
I love deadlines, I love the whooshing sound they make as they fly by...
org.jdesktop is not part of the standard java api.
From the error looks like your external jar which includes this class is not on the classpath.
I dont use netbeans or drag and drop style UI builders (it is always best to hand code) so I cannot offer you further assistance on how to fix this error. The way to fix this error is using the standard java api group layout, or better yet hand coding and specifying your own layouts.
Is there a rule about posting the sane question on different forums? Have been stuck with this problem for a week or so and was thinking posting on stack overflow.
Well I tried adding the class by including swing-layout-1.0.4 jar file to the archive tag:
but then I have a separate issue where the org.me.hello.MyApplet2 class could not be found, this is the package.appletFile.class, so out of ideas there (I have posted thos query on netbeans communoity forum also to get some insight, it seems allot of people have this issue!!).
Anyways as you suggested I re-wrote the applet in text editor without the GUI builder & netbeans, saved the .java file to desktop, compiled through command line, and also put the HTML doc on the desktop (so HTML, clsss file all in same directory). However now the applet still dosent load and there are no errors on the console.
When the applet tag is highlighted in the web inspector it the applet displays as "applet 0px 0px".
I should if nade thst clear.
the scanner is never used and all console
references have been commented out, i just forgot to comment out the import. Instead i used JOptionpanes which I've seen used in applets before, also the applet works ok in apple viewer