Applet Won't work out of NetBeans W/Swing

My Applet is working in NetBeans sun AppletRunner, but won't run in a browser and gives this exception:
java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group
     at java.lang.Class.getDeclaredConstructors0(Native Method)
     at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
     at java.lang.Class.getConstructor0(Unknown Source)
     at java.lang.Class.newInstance0(Unknown Source)
     at java.lang.Class.newInstance(Unknown Source)
     at sun.applet.AppletPanel.createApplet(Unknown Source)
     at sun.plugin.AppletViewer.createApplet(Unknown Source)
     at sun.applet.AppletPanel.runLoader(Unknown Source)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)And my Applet extends javax.swing.JApplet, so whats wrong?

Did you specify the jar in the archive attribute of the applet element tag?
http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html#plugin
Of course this does not help if the class is not in the jar though. :-/ (which seems very strange)
-Puce

Similar Messages

  • My applet won't work in IE

    This applet won't work in IE, but it will in Opera, WHY??!!
    import java.awt.*;
    import java.applet.*;
    import javax.swing.*;
    public class MyApplet2 extends Applet {
         int hoeveelheid = 21;
         int computer;
         String vraag;
        int vraaggetal;
         public void start() {
              JOptionPane.showMessageDialog (null,
                    "We hebben 21 lucifers en we moeten er \n steeds om de beurt 1,2,3, of 4 pakken. \n Wie het laatste setje heeft, heeft gewonnenn.",
                  "Uitleg", JOptionPane.INFORMATION_MESSAGE);  
            while (hoeveelheid > 0){
                 do {     
                         vraag = JOptionPane.showInputDialog
                            ("We hebben er nog "+hoeveelheid+",\n hoeveel wil je er pakken?");
                      vraaggetal = Integer.parseInt (vraag);
                         if (vraaggetal > 4 || vraaggetal <= 0){
                                   JOptionPane.showMessageDialog (null,
                                     "Geef alsjeblieft een 1,2,3 of 4 in: ",
                                    "Fout", JOptionPane.INFORMATION_MESSAGE);
                         if (hoeveelheid < 4){
                              if (vraaggetal > hoeveelheid){
                                   JOptionPane.showMessageDialog (null,
                                     "We hebben er nog maar "+hoeveelheid+" dus "+vraaggetal+" lukt niet",
                                    "Fout", JOptionPane.INFORMATION_MESSAGE);                                                   
                  } while (vraaggetal > 4 || vraaggetal <= 0 || vraaggetal > hoeveelheid);          
               hoeveelheid = hoeveelheid - vraaggetal;
               if (hoeveelheid == 0) {
                         JOptionPane.showMessageDialog (null,
                               "U heeft gewonnen!! Gefeliciteerd",
                              "Victory", JOptionPane.INFORMATION_MESSAGE); 
               if (hoeveelheid != 0){
                         do {                        
                                computer = ((int)(Math.random() * 10));                                 
                           } while (computer > 4 || computer <= 0 || computer > hoeveelheid);
                             JOptionPane.showMessageDialog (null,
                           "We hebben nog "+hoeveelheid+",\n ik pak er "+computer,
                              "Uitleg", JOptionPane.INFORMATION_MESSAGE);
                              hoeveelheid = hoeveelheid - computer; 
                              if (hoeveelheid == 0){
                                   JOptionPane.showMessageDialog (null,
                                    "Whaha, ik heb gewonnen!!",
                                  "Victory", JOptionPane.INFORMATION_MESSAGE);   
    }

    You are using Swing components in your applet , and the Microsoft VM dosen't have the javax.swing package . You could try with the Sun Java Plug-in.

  • SOMEONE PLEASE HELP ME!!!!! My applets won't work.

    I have tried everything that has been suggested. I'm running out of hope.
    I set my environment variables, implemented the codebase tag in my html, compiled with -target1.1 and enabled the JIT for VM in Internet Explorer's Internet Options. I even downloaded the Java Plug-in. Nothing is working. No matter if the applet is an Applet or a JApplet.
    Every time i open an html file with an applet the page loads but the applet does nothing. When i mouseover the gray applet box i get a message in my browser's status bar reading "load: class myClass not found". Not even the example applets that came with the JDK1.4 i downloaded work. They all display that same message when i mouseover the gray box.
    They all do however work when i use the command prompt appletviewer.
    Is something wrong with my browser? If i view someone's on-line applets they work fine.
    As long as the applet's class file and html is not on my system or i view them throught the command prompt they work fine. Otherwise i get the status message "load: class myClass not found"
    Is something maybe wrong with my environment variables that i don't know about?
    I'm running Microsoft Windows 2000 Professional and Microsoft Internet Explorer 5.0.
    I also have a copy of Microsoft Visual Basic 6.0 installed on my machine. Is this maybe causing conflicts?
    SOMEONE PLEASE HELP ME!!!!!
    Chance

    I did a search using these (include the quotes): "load: class XXXX not found" and "load: class" "not found" and got quite a few hits. Everyone agrees that the problem is that Java can't find the applet file <appletName>.class and the problems fall into 2 types:
    (1) The applet requires a Java 1.2+ feature in your program and your browser is usings its default runtime, which is 1.1 based
    (2)The CODE attribute specifies the wrong name, the class name is saved with the wrong case, the class file is located in the wrong directory, or some similar typo.
    I Suggest that you double check that the JavaPlugin is activated (open it in Control Panel) and that the BROWSER tab shows that it is in use by IE. Then make sure that neither the HTML or applet files reference any directories - ie, just file names are being used, not directory paths. Everything should be in the same directory. Proof read everything in the HTML and applet files for spelling, UC/LC match, etc.
    Here are a few of the items I found:
    http://www.jguru.com/faq/view.jsp?EID=488128
    http://www.usingit.com/products/java/applet/agnpro/faq/
    http://www.srctec.com/help/cooltextfaq.htm
    http://forum.java.sun.com/thread.jsp?forum=54&thread=246794
    http://forum.java.sun.com/thread.jsp?forum=54&thread=142328
    There's lost more, everything I saw said the same thing as I did above. It's a matter of you finding the problem, it's there.

  • Autoinstallation Applet won't work without a refresh

    Ahoy - I have completed an applet that finds the java home directory and installs the three javacomm API files (if they do not exist). After writing these three files, it redirects the browser to a webpage with another applet, this second applet being one that uses javacomm.
    The autoinstallation works perfectly (on my computer at least ;-) in that the files install where they are supposed to. But upon redirection, the second applet still insists that the javacomm classes don't exist, and so it will not initialize.
    If I close down all my browser windows and open this applet back up, everything is happy again - it loads with no problems and performs as expected.
    But I would realllly not like to have to write a disclaimer at the bottom of my web page: "If this does not load, please close down all your browser windows and try again."
    Any idea why this is happening?

    Thanks bsamp and DrClap.
    I think it's more likely to be that the browser's JVM has already identified >everything in the extensions directory (which is where you install javax.comm, >correct?) and it doesn't react to new jars in that directoryThat makes sense =) It doesn't make happy sense, but it makes sense =\
    If I can't find a way to make the JVM take another look, then I guess I could live with a one-time required restart for each computer (though it might not go over well =P)
    I didn't have to call Regsvr when I installed it either...mm, I will see if I can find anything about making the JVM reload extensions (I agree with your assessment of my sanity, Doctor Clap).

  • My applet won't work properly??

    Why wont' my applet work???
    Here take a look at my source code!
    import java.awt.*;*
    *import java.net.*;
    import java.applet.*;
    public class applet extends Applet implements Runnable
    private Thread th;
    private boolean key_enter;
    Image background;
    public void init()
    background = getImage(getCodeBase(), "background.gif");
    key_enter = false;
    public boolean keyboard(Event e, int key)
    if(key == 13)
    Launch("[http://www.vasignup.webbyen.dk/]");
    return true;
    public static void Launch(String launch)
    String operatingSystem = System.getProperty("os.name");
    try
    if(operatingSystem.startsWith("Windows"))
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + launch);
    } else
    } catch(Exception exception)
    System.err.println("Error Launching URL.");
    exception.printStackTrace();
    private void getImages()
    public void start()
    th = new Thread(this);
    th.start();
    public void destroy()
    th.stop();
    public void run()
    public void stop()
    th.stop();
    public void update(Graphics g)
    public void paint(Graphics g)
    g.drawImage(background, 0, 0, this);
    }So as you see my applet was supposed to open up, the internet page vasignup.webbyen.dk??
    Please help me..

    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + launch);Imagine if you will, some rogue applet on the internet which instead of attempting to execute the above external application, attempted to execute any arbitrary executable, with any side effects such as deleting files, formatting the drive, etc.
    Do you now see the problem?
    Applets (unsigned ones, anyway) are not allowed to do that.

  • Email Applet won't work after installing JSDK 1.4

    I am used to visiting my online email facility at University which contains an Applet to allow users to reply to, compose, delete messages, etc but since installing JSDK 1.4 I am now longer able to view the Applet - I am presented with the Java icon (coffee cup) and the following code in the Java console. Previous to JSDK I had installed no version of Java on this machine but I have had previous versions installed on other machines which caused no problems at all. Any help or advice would be appreciated, thanks.
    =========================================================================
    Java(TM) Plug-in: Version 1.4.1_02
    Using JRE version 1.4.1_02 Java HotSpot(TM) Client VM
    User home directory = D:\Documents and Settings\Administrator.UNI2000
    Proxy Configuration: No proxy
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    java.util.zip.ZipException: ZIP file must have at least one entry
         at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:292)
         at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:141)
         at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:311)
         at sun.plugin.cache.CachedJarLoader.decompress(CachedJarLoader.java:432)
         at sun.plugin.cache.CachedJarLoader.access$500(CachedJarLoader.java:53)
         at sun.plugin.cache.CachedJarLoader$5.run(CachedJarLoader.java:335)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.cache.Cache.privileged(Cache.java:219)
         at sun.plugin.cache.CachedJarLoader.download(CachedJarLoader.java:320)
         at sun.plugin.cache.CachedJarLoader.load(CachedJarLoader.java:128)
         at sun.plugin.cache.JarCache.get(JarCache.java:172)
         at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(CachedJarURLConnection.java:93)
         at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(CachedJarURLConnection.java:78)
         at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:580)
         at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:541)
         at sun.misc.URLClassPath$3.run(URLClassPath.java:319)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.URLClassPath.getLoader(URLClassPath.java:308)
         at sun.misc.URLClassPath.getLoader(URLClassPath.java:285)
         at sun.misc.URLClassPath.getResource(URLClassPath.java:155)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:134)
         at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:168)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:501)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:567)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1778)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:496)
         at sun.applet.AppletPanel.run(AppletPanel.java:293)
         at java.lang.Thread.run(Thread.java:536)
    load: class lotus.notes.apps.actionbar.ActionBar.class not found.
    java.lang.ClassNotFoundException: lotus.notes.apps.actionbar.ActionBar.class
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:153)
         at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:168)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:506)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:567)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1778)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:496)
         at sun.applet.AppletPanel.run(AppletPanel.java:293)
         at java.lang.Thread.run(Thread.java:536)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:252)
         at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:42)
         at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:143)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:140)
         ... 10 more

    Goto Tools, Internet Options, Advanced, scroll down to Java (Sun) Unclick (no check mark) Use Java 2 1.x.x for <applet>, close all IE windows. Open IE, try again.

  • Applet won't work =(

    I'm having mysterious problems on trying to run my applet. It just seems the .class file is not found.
    For example I have this <html>
    <html>
    <applet code="AppletMain.class" width="800" height="600"> </applet>
    </html>And I get this error in the Java Console
    java.lang.NoClassDefFoundError: AppletMain (wrong name: buttonsoccerclient/AppletMain)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception: java.lang.NoClassDefFoundError: AppletMain (wrong name: buttonsoccerclient/AppletMain)The AppletMain.class file is in the same folder as the html.

    xissburg wrote:
    And I get this error in the Java Console
    Exception: java.lang.NoClassDefFoundError: AppletMain (wrong name: buttonsoccerclient/AppletMain)The AppletMain.class file is in the same folder as the html.The error is telling you that the AppletMain.class file that was found does not contain a class whose fully qualified class name is AppletMain. Instead, that .class file contains a class whose fully qualified class name is buttonsoccerclient.AppletMain. In other words, you have put "package buttonsoccerclient;" as the first line of the AppletMain source code file. So, the AppletMain.class file must be in a directory named buttonsoccerclient. And that directory must in the codebase directory of the applet. And the applet tag 'code' must specify buttonsoccerclient.AppletMain.

  • Applet won't start

    Hi!
    I have written an applet that works just fine on my own Tomcat 4
    server but when i try it on this ISP:n (web-hotel) it won't work!
    The ISP:n is running a Linux server but without X installed. The
    applet is using the following classes:
    import java.applet.Applet;
    import java.applet.AppletContext;
    import java.awt.*;
    import java.io.DataInputStream;
    import java.net.URL;
    import java.net.URLConnection;
    import java.util.*;I know that AWT sometimes need X installed but the applet is
    client-side right? Anyone knows why the applet won't work??
    /Andreas

    Hey there Andreas,
    I thought I posted this once but since I don't see it in the list, I will try again!
    I checked your page out and I am not getting any errors so I assume that your class is up on the server and is serving up correctly. What I did notice, however, is that the file passed in as a parameter to the applet named "scrollinput.txt" is not in the directory with the page. This could be a problem. I have used a scrolling applet that does news with links in the past and the file had to be there for it to work. I am assuming the same applies here. So in short, I think the applet is working, it is just doing what it is told; Nothing.
    Take care,
    Patrick

  • Javascript or applet dropdown menus won't work in IE6, How can I solve this

    I've made some dropdownmenu's of javascript and one of java applets. But they don't work in IE6. If IE6 is installed they won't work either. My friend has IE5.5 and he has no problems with the menus. How can you make them work.
    And how can you change the z-index of a javascipt/applet? How do you make a dropdownmenu that's put in the topframe slide over the mainframe?

    Perhaps someone could help me with the following question:
    I have a menu that cascades out of the Applet box. My question is:
    How do I close the menu without clicking on the Applet box? - i.e. if the user clicks on the HTML area of the WEB-PAGE, or simply waits a second or 2, the menu should collapse?
    I notice that this is actually the default behavior for the AWT classes - but then you can't set background colors etc. I need the same kind of behavior, but using Swing classes.
    Would appreciate any assistance or advice...

  • Somehow my iTunes app has been put into the trash.  How can I get this and all of the stuff that was in it back to my Application folder?  I try to drag it out of trash, but it won't work.

    Somehow my iTunes app has been put into the trash.  How can I get this and all of the stuff that was in it back to my Application folder?  I try to drag it out of trash, but it won't work.

    Also, when I do try to drag it out of the Trash to put it back into Applications (on the Finder sidebar), it asks me to authenticate with the administration password.  I enter it, and then a window appears saying that I can't do that because I do not have permission to modify iTunes.  Please help.

  • I had to get a new ITouch and now my app Tempo Magic won't work. It allows me to do evertyhing but play the music. When I hit  play it kicks me out - any help would be appreciated. Thank you

    I had to get a new ITouch and now my app Temp Magic won't work. It allows me to select the temp and music I want but when I hit play it kicks me out. Can someone please help me resolve this? Thanks!

    Try here:
    iOS: Troubleshooting applications purchased from the App Store

  • Updated iTunes to 10.5, iTunes won't work now! Everytime I open iTunes it just freezes and I can't click on anything. It says to take it out of compatibility mode and still doesn't work! any help??

    Updated iTunes to 10.5, iTunes won't work now! Everytime I open iTunes it just freezes and I can't click on anything. It says to take it out of compatibility mode and still doesn't work! any help??
    Thank you. Nick

    Okay, we'll try the technique from the following post. Be sure to be logged in to your usual user account when doing so. (Otherwise you'll be editing the wrong set of HKEY_CURRENT_USER keys.)
    Re: How do I turn off the compatibility mode for ITunes.
    Does that clear up the compatibility message?

  • I somehow installed a version of Firefox which won't work on my "old" iMac G5 (10.5.8) so I trashed the program and now I can't get it out of my trash bin... Any help appreciated because now I can't empty my trash at all! Thanks.

    I somehow installed a version of Firefox which won't work on my "old" iMac G5 (10.5.8) so I trashed the program and now I can't get it out of my trash bin... Any help appreciated because now I can't empty my trash at all! Thanks!!

    You must purchase a new QT key for each computer.
    Since you have a new iMac, you are entitled to 90 days of FREE phone tech support from Apple and you can use the Chat with a Support Agent. The online chat support _*is available 24 hours a day, 7 days a week.*_
    If you've purchased an AppleCare Protection Plan, you're eligible for the duration of that agreement.

  • I have a Mac pro. A mini disc has got into the disc drive. Eject won't work. How do I get it out without damage to the disc drive?

    I Have a MacBook pro laptop. A mini-disc has got into the disc drive. The eject won't work. How do I get it out without damage to the disc drive?

    Alternatively, you could try some of these suggestions (at your own risk of course):
    https://www.ifixit.com/Discuss/thread/4563

  • HT202157 I just upgraded apple tv.  Now it won't work?  Any solutions out there?

    I just upgraded AppleTV. Now it won't work? Any solutions out there?

    Which OS?
    Have you checked that it complies with Lr's system requirements?
    http://helpx.adobe.com/lightroom/system-requirements.html#Photoshop Lightroom 5 system requirements and language versions

Maybe you are looking for

  • Phone stopped working after the iOS7.

    Ever sinse i updated my Iphone 4 to the iOS 7.0.2 my phone started acting weird, and has finally STOPPED working. I am extremely disappointed with Apple and the new iOS 7 as the new software has too many bugs and is definitely NOT the best for the Ip

  • A question about Job Creation

    Hi Expert, By JOB_OPEN, JOB_SUBMIT, JOB_CLOSE, we can schedule a job. When the first two FMs is executed, the job is still in 'scheduled' status. Only when the FM JOB_CLOSE is executed, the job will be in 'released' status. In my applicaiton, I need

  • Critical issue - delta queues for LIS empty after upgrade BW3.5

    The delta queue in R/3 for LIS sources (S260-261-262) remains empty, even after a successful init delta. Hence I cannot extract delta records. BW3.5 PI2004.1 Does the BW upgrade has an effet on the delta queue management in R/3 ? The previous configu

  • How to clear last search criteria in ADF form?

    I'm building an ADF form. This form uses JTextField controls. When I switch to Find Mode, I want to clear criteria of the last search that JDev remembered. I've tried to remove ActionListener of FIND button in Navigation Bar, then add a new ActionLis

  • Assistance in writing Query / Query Logic.

    I have a peculiar requirement to fetch data. Table Structure ( Sample ... although real table has more fields) Order ( orderid varchar2(30), custid varchar2(30), status varchar2(1), createdon datetime ) Sample Data: OrderID CustID AccID Status create