JApplet won't initialize in Web Browser...

Hi,
I just started teaching myself Java a few days ago. I've got the JSE JDK, and NetBeans. I've been following the tutorials. I've been programming in C(++) and various other languages for quite a while so the programming aspect of Java has come easily. When I started delving into GUI's I started encountering problems. I'm commencing a project, and basically, I need a Java applet to run in a web browser, and people need to be able to run it in a page that they've downloaded, and stuff. You know. Anyway, so here's what I did:
In Netbeans:
New Project > General > Java Class Library
So now I have a new, empty project.
Right click Project Node > New > File/Folder...
Java GUI Forms > JApplet Form
I put it in it's own package called "hello"
Add a JLabel from the Palette onto the GUI Designer thing.
Right-Click Project Node > Build Project:
init:
deps-jar:
Created dir: D:\Adrien Pellerin\Apps\JavaLibrary5\build\classes
Compiling 1 source file to D:\Adrien Pellerin\Apps\JavaLibrary5\build\classes
compile:
Created dir: D:\Adrien Pellerin\Apps\JavaLibrary5\dist
Building jar: D:\Adrien Pellerin\Apps\JavaLibrary5\dist\JavaLibrary5.jar
jar:
BUILD SUCCESSFUL (total time: 0 seconds)Right click NewJApplet.java > Run File: It works fine.
Go to project folder > build > classes > view NewJApplet.html
It opens in IE. And it says "Loading Java Applet Failed."
Here's what it says in the console:
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 here's the code for the original Java file:
* NewJApplet.java
* Created on October 11, 2006, 2:38 PM
package hello;
* @author  Adrien Pellerin
public class NewJApplet extends javax.swing.JApplet {
    /** Initializes the applet NewJApplet */
    public void init() {
        try {
            java.awt.EventQueue.invokeAndWait(new Runnable() {
                public void run() {
                    initComponents();
        } catch (Exception ex) {
            ex.printStackTrace();
    /** This method is called from within the init() method to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
        jLabel1 = new javax.swing.JLabel();
        jLabel1.setText("jLabel1");
        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(163, 163, 163)
                .add(jLabel1)
                .addContainerGap(203, Short.MAX_VALUE))
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(129, 129, 129)
                .add(jLabel1)
                .addContainerGap(157, Short.MAX_VALUE))
    }// </editor-fold>
    // Variables declaration - do not modify
    private javax.swing.JLabel jLabel1;
    // End of variables declaration
}I have the JRE installed. I can view other Applets in my browser, but JApplets don't work. What's going on?
Thanks

The error has nothing to do with your applet. The GroupLayout class is used by Matisse, the NetBeans forms editor. NetBeans should have packaged it into a jar file together with your applet class file. The HTML file that launches your applet should specify this jar file.
Here is a sample APPLET tag:
    <APPLET name="TalkHawk" ARCHIVE="TalkHawkApplet.jar" code="TalkHawkAppletPkg.TalkHawkApplet.class" width="100" height="100">
        <param name="Title" value="Magic Beans Conferencing Center">
        <param name="Logo" value="images/Logo2.jpg">
        <param name="Debug" value="0">Here is the equivalent using jsp:
    <jsp:plugin type="applet"
                archive="TalkHawkApplet.jar"
                code="TalkHawkAppletPkg.TalkHawkApplet.class"
                jreversion="1.4"
                nspluginurl="http://java.sun.com/j2se/1.4.2/download.html"
                iepluginurl="http://java.sun.com/j2se/1.4.2/download.html"
                name="TalkHawk"
                width="100"
                height="100">
        <jsp:params>
            <jsp:param name="Title" value="Magic Beans Conferencing Center" />
            <jsp:param name="Logo" value="images/Logo2.jpg" />
            <jsp:param name="Debug" value="0" />
        </jsp:params>
        <jsp:fallback>
            <p>Unable to start plugin.</p>
        </jsp:fallback>
    </jsp:plugin>

Similar Messages

  • Captivate (5) project won't open in Web Browser

    Hello,
    Since a few weeks I can't open my projects in the web browser. Accept one of the projects (only questionslides), i have been searching for differents in the setttings but i couldn't find any differtens. When I publish the project in a .swf still the project won't open.
    When I will get a preview in Web Browser or publish, the project is opening in the Web Browser and it looks like the project fade in and out in not even a second. A quick view of the background is visible . But i don't get any massage of error of something. And the page turn white.To preview the project in capitvate is no problem.
    I hope somebody could help me out.
    Roanne

    Hello,
    I do not know if you have Text Animations in your project? If yes, probably you are having issues due to the latest Flash Player. There is a hotfix to be found in this Captivate blog post:
    Solution for Captivate ...
    Lilybiri

  • My applet won't respond in web-browser !

    Hi,
    I've made a tictactoe applet wich run just fine in my appletviewer (JBuilder3). BUT, when I deploy it as an executable jar-file and try to run it from a web-page, it doesn't respond to mouse-clicks. It looks right(so the paint(Graphics g)-method is working allright), but it seems that the mouseUp(Event e, in x, int y) never is called upon. I've deployed the jar file from JBulider3 University, and I am watching the applet through IE 6(With new JVM from sun).
    I've put the applet here : http://home.chello.no/~rasmuse.
    Anyone?
    Thanks

    Your applet worked okay in my IE6. It showed blue circles in squares where I clicked the mouse and red Xes in other squares. With your new plugin install, did you disable the microsoft VM? Or use the <object><embed> tags to request the plugin VM instead of the ms VM? Only other thing I can think of is that the applet is slow to load.

  • Picture won't display in web browser

    Hi Everyone,
    I have a website that I have created and I place a graphic in
    .jpg and also .png format inside of a div tag on the left side of
    my page template. When I go to view the web page everything else on
    the page will display except for this graphic. I have Firefox and
    IE7. Can anyone help me out with what may be the problem. I have
    tried everything that I can thing of
    Thanks,
    Robert

    "ryonker" <[email protected]> wrote in
    message
    news:g0uspm$g57$[email protected]..
    > Hi Everyone,
    >
    > I have a website that I have created and I place a
    graphic in .jpg and
    > also
    > .png format inside of a div tag on the left side of my
    page template. When
    > I go
    > to view the web page everything else on the page will
    display except for
    > this
    > graphic. I have Firefox and IE7. Can anyone help me out
    with what may be
    > the
    > problem. I have tried everything that I can thing of
    you'd have to give us a URL for the site first so we can see
    what you're
    referring to.

  • Adobe Reader won't print in web browser when both Reader & Pro installed

    Several of our machines have Acrobat Pro 10.1.4 installed and they also had Reader 10.1.4 installed but when Reader got upgraded to version 11 now PDFs opened in web browsers will not print.   Seeing as it is fairly common for computers to have both Pro and Reader installed I do not understand why Adobe cannot account for their own products and conflicts.   I was hoping to avoid having to uninstall Reader 11 from the machines affected so I would appreciate if there is anything I can have the users do to remedy this?

    Gemini146...
    I've ran into many, many, many circumstances like these and if the uninstall from add/remove does not work, what I would recommend is for you to delete the directory c:\program files\adobe and c:\program files\common files\adobe
    Then try the installation of what ever version you want. The install should proceed.
    If not (which had always been rare for me) then the next step I would advise (since windows installer clean utility didn't work)... is to go into the registry
    (regedit) and click on Edit, find
    type in: adobe reader
    or        adobe
    and search the entire registry and delete each entry that it finds associated with Adobe Reader only
    Of course, you need to know how to differentiate between what's for Adobe Reader and what's for Adobe Acrobat (granted that you do have Acrobat installed)
    Is there risk involved with this method? Yes... but if you know your computer and know your way around the registry, you should be fine.
    Also, make a backup of your registry as well as create a Restore Point before doing all this. Just to be on the safe side.
    Then proceed with re-installing Adobe Reader and you should be ok.

  • Adobe Captivate 5 - Video won't play in web browser

    I've tried inserting it as a slide video and as a FLV file. Plays fine in the preview, but not after publication and pulling it up on website. In one version the skin is there, but inactive. In others, there's just nothing there. The progress bar continues to move (on the presentation skin), but no vid plays. I've tried IE, Firefox and Chrome without success. Vid files aren't that big (14 and 21 KB, respectively). I've tried compressing when I publish, to no avail. I'm not yet an expert here and don't know what else to try. If you've got an idea, I'll try it. Thanks.

    Hi there
    Stoopid question time.
    You *DID* know that you need to copy the FLV to the same server location as the SWF, right? (Sometimes folks think the video is included and all wrapped up inside the SWF)
    Assuming the video is there, have you tried linking directly to the video? It could be you need to have a friendly chat with your web admin peeps and have them add the FLV files to their list of MIME types in order to properly serve them.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Presentation 2011 swf won't open in web browser

    i just upgraded to Presentation Design 2011.  When i double click on the swf file that was generated druing the preview function, it will not open in my browser.  It says it is "initializing" but will not open.  i can open all swf files created with Presentation Design 2008.  any idea what has happened?

    Hello,
    I do not know if you have Text Animations in your project? If yes, probably you are having issues due to the latest Flash Player. There is a hotfix to be found in this Captivate blog post:
    Solution for Captivate ...
    Lilybiri

  • I tried down loading mozilla firefox to use as a web browser. It was downloaded 100% then when prompted to "run" the error message comes up with a red cross and the message'This file is corrupted" and won't let me proceed. What do I do now?

    I tried down loading mozilla firefox to use as a web browser. It was downloaded 100% then when prompted to "run" An error message comes up with a red cross and the message'This file is corrupted" and won't let me proceed. What do I do now?

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox.<br />
    You can try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    See http://kb.mozillazine.org/Unable_to_save_or_download_files

  • I have an iPod Touch and am going on a cruise where I have been told that I won't be able to use Safari so I should download Firefox.  I found "Mercury Web Browser" Firefox at the app store.  Is this what I need? I'm leaving on Sept. 3rd.

    I have an iPod Touch and am going on a cruise where I have been told that Safari won't work on the ship so I need to download Firefox. My iPod said that Safari cna't download it from the Firefox website.  I found "Mercury Web Browser" Firefox, in the app store (free) and am wondering if that is what I need?  Help, I'm leaving on Sept. 3/12.  Thanks.

    - I never heard that but it may be true. It could be that for some reason Safari can't be used to log into the network. Once logged in, Safari should work fine
    - However, I see nothing that say the Mercury Web Browser is Firefox. I would contact the cruise line and ask if and how you use the ship's['s wifi for an iPhone or iPad (it will apply to iPod touch)

  • Certain web sites won't load on any browser on Macbook Pro

    Starting yesterday certain web sites won't load on any browser (Safari or Chrome). These include sites like the New England Journal of Medicine, Washington Post, and English Bulldog News. I get an error message in Safari that the server took too long to respond and in Chrome I get a connection timeout error message. I updated Adobe Flash with a clean install as I was unable to update using the standard method due to connection timeout. That restored my access to YouTube video but today it takes ~2 minutes to load a YT video. Web sites are loading fine on my phone and household PCs.
    Not sure if it is notable that my internet loading capacity has been very slow for some time. I worked with the internet company to increase the network speed but my computer has not seen benefit. No problems on the PCs in our house but my Macbook very frequently gets partially "kicked-off" the network as indicated by yellow lights seen next to the "internet" and "server" items in my Network Diagnostics utility.
    I looked at old threads and ran EtreCheck (see results copied below) as was recommended to another user several months ago, but would appreciate any thoughts about where to go from here. Could it be malware? Or just a classic case of operator error? Here are the EtreCheck "red" items extracted from the full report below:
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist [Support]
      [failed] com.apple.CSConfigDotMacCert-[...]@me.com-SharedServices.Agent.plist
    Internet Plug-ins: ℹ️
      Flash Player: Version: 16.0.0.235 - SDK 10.6 Cannot contact Adobe
    FULL RESULTS:
    EtreCheck version: 2.1.4 (107)
    Report generated December 17, 2014 12:02:37 PM CST
    Click the [Support] links for help with non-Apple products.
    Click the [Details] links for more information about that line.
    Click the [Adware] links for help removing adware.
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Mid 2012) (Verified)
      MacBook Pro - model: MacBookPro9,2
      1 2.5 GHz Intel Core i5 CPU: 2-core
      8 GB RAM
      BANK 0/DIMM0
      4 GB DDR3 1600 MHz ok
      BANK 1/DIMM0
      4 GB DDR3 1600 MHz ok
      Bluetooth: Good - Handoff/Airdrop2 supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      Intel HD Graphics 4000 - VRAM: 512 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      Mac OS X 10.7.5 (11G63b) - Uptime: 12:26:55
    Disk Information: ℹ️
      TOSHIBA MK5065GSXF disk0 : (500.11 GB)
      disk0s1 (disk0s1) <not mounted> : 210 MB
      Macintosh HD (disk0s2) / : 499.25 GB (261.25 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      MATSHITADVD-R   UJ-8A8
    USB Information: ℹ️
      Apple Inc. BRCM20702 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Computer, Inc. IR Receiver
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Inc. FaceTime HD Camera (Built-in)
    Thunderbolt Information: ℹ️
      Apple, Inc. MacBook Pro
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
      [loaded] com.microsoft.office.licensing.helper.plist [Support]
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist [Support]
      [failed] com.apple.CSConfigDotMacCert-[...]@me.com-SharedServices.Agent.plist [Details]
      [loaded] com.citrixonline.GoToMeeting.G2MUpdate.plist [Support]
      [loaded] com.google.keystone.agent.plist [Support]
      [running] com.spotify.webhelper.plist [Support]
    User Login Items: ℹ️
      iTunesHelper ApplicationHidden (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      Music Manager UNKNOWNHidden (missing value)
      Speech Startup Application (/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecogn ition.framework/Versions/A/Speech Startup.app)
      Dropbox Application (/Applications/Dropbox.app)
      Music Manager ApplicationHidden (/Users/[redacted]/Library/PreferencePanes/MusicManager.prefPane/Contents/Helpe rs/MusicManagerHelper.app)
      Spotify Application (/Applications/Spotify.app)
    Internet Plug-ins: ℹ️
      Flip4Mac WMV Plugin: Version: 2.4.4.2 [Support]
      FlashPlayer-10.6: Version: 16.0.0.235 - SDK 10.6 [Support]
      QuickTime Plugin: Version: 7.7.1
      Flash Player: Version: 16.0.0.235 - SDK 10.6 Cannot contact Adobe
      AdobePDFViewer: Version: 10.1.4 [Support]
      SharePointBrowserPlugin: Version: 14.3.2 - SDK 10.6 [Support]
      Silverlight: Version: 5.1.30514.0 - SDK 10.6 [Support]
      JavaAppletPlugin: Version: Java 7 Update 09 Check version
    User internet Plug-ins: ℹ️
      CitrixOnlineWebDeploymentPlugin: Version: 1.0.105 [Support]
    3rd Party Preference Panes: ℹ️
      Flash Player  [Support]
      Flip4Mac WMV  [Support]
      Java  [Support]
      MusicManager  [Support]
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
          18% Google Chrome
          8% WindowServer
          2% SpeechRecognitionServer
          2% coreaudiod
          2% hidd
    Top Processes by Memory: ℹ️
      232 MB Google Chrome
      189 MB System Preferences
      129 MB Spotify
      86 MB Spotify Helper
      77 MB WindowServer
    Virtual Memory Information: ℹ️
      952 MB Free RAM
      4.99 GB Active RAM
      1.52 GB Inactive RAM
      1.13 GB Wired RAM
      1.02 GB Page-ins
      0 B Page-outs
    Diagnostics Information: ℹ️
      Dec 16, 2014, 11:36:19 PM Self test - passed

    Update: I ran Console upon trying to load a web site that won't load. Here are the messages from that action with any identical messages deleted:
    12/17/14 1:45:51.013 PM [0x0-0x1b01b].com.google.Chrome: [201:2311:1217/134551:ERROR:location_bar_view_mac.mm(602)] Not implemented reached in virtual void LocationBarViewMac::EndOriginChipAnimations(bool)
    12/17/14 1:45:51.000 PM kernel: Google Chrome He (map: 0xffffff8014ab4138) triggered DYLD shared region unnest for map: 0xffffff8014ab4138, region 0x7fff8a200000->0x7fff8a400000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
    12/17/14 1:46:16.515 PM [0x0-0x1b01b].com.google.Chrome: [604,1956432224:13:46:16.514831] Native Client module will be loaded at base address 0x00006a1600000000
    12/17/14 1:46:16.000 PM kernel: Data/Stack execution not permitted: Google Chrome He[pid 604] at virtual address 0x107509000, protections were read-write
    I forgot to note I have also done the obvious things like computer restart, shut down, and modem reset.

  • I'm using Windows 8.1 and the browser won't load any web page. I downloaded the latest one from the website. Any help would be great. All other browsers work.

    I'm using Windows 8.1 and the browser won't load any web page. I downloaded the latest one from the website. Any help would be great. All other browsers work.

    Hi curtismoxam,
    Please try these troubleshooting steps: [[Fix problems connecting to websites after updating Firefox]]

  • JavaScript won't close web browser

    Captivate 6: JavaScript won't work for my close button as it did in previous versions of Captivate..
    < a href="javascript:window.opener='x';window.close();">Close< /a>
    Nothing happens when I click it in the web browser. What am I doing wrong?

    Hi there
    Have you read the link below?
    Click here to view
    Cheers... Rick

  • PDF link of type "open a file" won't work from within web-browser

    Hi!
    I have a pdf-document in which I have created a link of the type "Open a file" ( in this case it is a word document, but the type of file doesn't matter).  When I click this link directly in Acrobat (Acrobat 9 Standard) it works just as excpected, that is, the document opens in word, after I've confirmed to Acrobat that it's ok to open.
    Opening the pdf itself from within a web-browser (IE8) is no problem. The document is opened by the Acrobat plug-in, inside the web-browser, as expected. The "hot-spot" to the link is also there, but when I click on the link, Acrobat (I think it's Acrobat and not the web-browser) asks me if it's ok to "Connect to file://///C:/testdoc.doc". And when I confirm this nothing happens (of course, since there are way too many slashes added after the "File:" beginning of the string.
    When I doublecheck the link in Acrobat Standard with the link tool, it look perfectly allright (under "Actions" I find the heading "Open a file" and under that the text "File: C\testdoc.doc").
    Anyone know where the problem lies?
    Thanks for any help!
    Regards
    Per Williamson
    Stockholm
    Sweden

    I found mention online that linking to a zipped pdf file will cause the browser to download the PDF to the local user's PC where they can complete and submit the form (the mailto: command button works when the PDF is opened locally rather than within a browser window).  If there is a more "elegant" solution, I would be grateful for your advice.

  • Emails sent through Mail 7.0 on Mac won't appear in the Sent folder in the Yahoo web browser or the Mail app for iPad.

    It seems that emails I send via Mail on my mac are stored only in Mail's Sent folder. These emails don't appear in the sent folder of Yahoo web browser, iPad Mail app, or the Y! Mail android app..
    I've tested to see whether my emails are actually sending properly, and they are. I just want to know why the Sent messages on my mac aren't appearing anywhere else. I've read similar issues to this but haven't yet found a reason or solution.
    Thanks in advance

    [edit] I dragged the email I sent through the MBP Mail app (under MAILBOXES > Sent > Yahoo!) to the highlighted Sent folder (YAHOO! > Sent), and now it shows up on all Yahoo Sent folders (iPad app, web browser, phone app). Not entirely solved the issue but will use web browser to sent future emails to keep everything in sync.

  • Java won't enable in firefox web browser

    I have tried everything possible I could find the fix this issue. I am trying to use the "live chat" feature on the website "car-part.com" in order to chat with auto recycling companies online, but it constantly says that java is not enabled in the web browser. I have gone through the settings and plugins with no luck. I even tried downloading java again from java.com and at the end of the download it states that "java content is disabled in web browsers". What is going on here?

    Java and JavaScript are different languages.
    To avoid confusion, see:
    *http://kb.mozillazine.org/JavaScript_is_not_Java
    There has been a change in the Java security settings, see:
    *https://support.mozilla.org/kb/how-allow-java-trusted-sites
    *"What should I do when I see a security prompt from Java?":<br>http://www.java.com/en/download/help/appsecuritydialogs.xml
    If you visit a website regularly then a possible workaround is to add the URL to the Java Exceptions Site List, see:
    *"Why are Java applications blocked by your security settings?":<br>http://www.java.com/en/download/help/java_blocked.xml
    *"How can I configure the Exception Site List?":<br>http://www.java.com/en/download/faq/exception_sitelist.xml

Maybe you are looking for