Applet Working in the AppletViewer not Working in Explorer

After a few compilation of the following code the changes I made to the java file were only viewed by the appletviewer, not the explorer, the change I have made and is not shown in the explorer is setting the foreground and back round of calPanel label. Please compile the code yourself:
import java.awt.*;
import java.lang.*;
import java.awt.event.*;
public class JavaCal extends java.applet.Applet implements ActionListener {
// The 2 variables contain the numbers
// for the action to take place
double doubleBuf1 = 0;
double doubleBuf2 = 0;
// Contains the numbers and act in string format
StringBuffer totalBuffer = new StringBuffer();
// Interface components
Button calPercent, calSqr, calClear, calDev, calSeven, calEight, calNine, calMul, calFour, calFive, calSix, calSub, calOne, calTwo, calThree, calAdd, calNull, calDec, calEquals;
Label calPanel = new Label("0", Label.RIGHT);
void buildConstraints(GridBagConstraints gbc, int gx, int gy,
int gw, int gh, int wx, int wy) {
gbc.gridx = gx;
gbc.gridy = gy;
gbc.gridwidth = gw;
gbc.gridheight = gh;
gbc.weightx = wx;
gbc.weighty = wy;
public void init() {  
setBackground(Color.white);
GridBagLayout gridbag = new GridBagLayout();
GridBagConstraints constraints = new GridBagConstraints();
setLayout(gridbag);
//Calculator Panel label field
buildConstraints(constraints, 0, 0, 4, 1, 0, 2);
constraints.fill = GridBagConstraints.BOTH;
gridbag.setConstraints(calPanel, constraints);
          calPanel.setForeground(new Color(65280));
          calPanel.setBackground(new Color(0));
add(calPanel);
constraints.fill = GridBagConstraints.NONE;
//Button %
buildConstraints(constraints, 0, 1, 1, 1, 100, 100);
constraints.fill = GridBagConstraints.BOTH;
calPercent = new Button("%");
gridbag.setConstraints(calPercent, constraints);
add(calPercent);
calPercent.addActionListener(this);
//Button Sqr
buildConstraints(constraints, 1, 1, 1, 1, 100, 100);
calSqr = new Button("sqr");
gridbag.setConstraints(calSqr, constraints);
add(calSqr);
calSqr.addActionListener(this);
//Button Clear
buildConstraints(constraints, 2, 1, 1, 1, 100, 100);
constraints.fill = GridBagConstraints.BOTH;
calClear = new Button("c");
gridbag.setConstraints(calClear, constraints);
add(calClear);
calClear.addActionListener(this);
//Button \
buildConstraints(constraints, 3, 1, 1, 1, 100, 100);
calDev = new Button("/");
gridbag.setConstraints(calDev, constraints);
add(calDev);
calDev.addActionListener(this);
//Button 7
buildConstraints(constraints, 0, 2, 1, 1, 100, 100);
calSeven = new Button("7");
gridbag.setConstraints(calSeven, constraints);
add(calSeven);
calSeven.addActionListener(this);
//Button 8
buildConstraints(constraints, 1, 2, 1, 1, 100, 100);
calEight = new Button("8");
gridbag.setConstraints(calEight, constraints);
add(calEight);
calEight.addActionListener(this);
//Button 9
buildConstraints(constraints, 2, 2, 1, 1, 100, 100);
calNine = new Button("9");
gridbag.setConstraints(calNine, constraints);
add(calNine);
calNine.addActionListener(this);
//Button *
buildConstraints(constraints, 3, 2, 1, 1, 100, 100);
calMul = new Button("*");
gridbag.setConstraints(calMul, constraints);
add(calMul);
calMul.addActionListener(this);
//Button 4
buildConstraints(constraints, 0, 3, 1, 1, 100, 100);
calFour = new Button("4");
gridbag.setConstraints(calFour, constraints);
add(calFour);
          calFour.addActionListener(this);
//Button 5
buildConstraints(constraints, 1, 3, 1, 1, 100, 100);
calFive = new Button("5");
gridbag.setConstraints(calFive, constraints);
add(calFive);
          calFive.addActionListener(this);
//Button 6
buildConstraints(constraints, 2, 3, 1, 1, 100, 100);
calSix = new Button("6");
gridbag.setConstraints(calSix, constraints);
add(calSix);
          calSix.addActionListener(this);
//Button -
buildConstraints(constraints, 3, 3, 1, 1, 100, 100);
calSub = new Button("-");
gridbag.setConstraints(calSub, constraints);
add(calSub);
calSub.addActionListener(this);
//Button 1
buildConstraints(constraints, 0, 4, 1, 1, 100, 100);
calOne = new Button("1");
gridbag.setConstraints(calOne, constraints);
add(calOne);
          calOne.addActionListener(this);
//Button 2
buildConstraints(constraints, 1, 4, 1, 1, 100, 100);
calTwo = new Button("2");
gridbag.setConstraints(calTwo, constraints);
add(calTwo);
calTwo.addActionListener(this);
//Button 3
buildConstraints(constraints, 2, 4, 1, 1, 100, 100);
calThree = new Button("3");
gridbag.setConstraints(calThree, constraints);
add(calThree);
calThree.addActionListener(this);
//Button +
buildConstraints(constraints, 3, 4, 1, 2, 100, 100);
calAdd = new Button("+");
gridbag.setConstraints(calAdd, constraints);
add(calAdd);
calAdd.addActionListener(this);
//Button 0
buildConstraints(constraints, 0, 5, 1, 1, 100, 100);
calNull = new Button("0");
gridbag.setConstraints(calNull, constraints);
add(calNull);
calNull.addActionListener(this);
//Button .
buildConstraints(constraints, 1, 5, 1, 1, 100, 100);
calDec = new Button(".");
gridbag.setConstraints(calDec, constraints);
add(calDec);
calDec.addActionListener(this);
//Button =
buildConstraints(constraints, 2, 5, 1, 1, 100, 100);
calEquals = new Button("=");
gridbag.setConstraints(calEquals, constraints);
add(calEquals);
calEquals.addActionListener(this);
     public void actionPerformed(ActionEvent event)
          /* Declares an object named "src" to represent the event.getSource()
          * method. This shortens the code that follows.
          Object src = event.getSource();
          /* Checks to see if the source of the event which src is representing
          * is a Button and can behave like a Button
          if (src instanceof Button)
     if(src == calNull) calPanel.setText("0");
     if (src == calOne) calPanel.setText("1");
     if(src == calTwo) calPanel.setText("2");
     if(src == calThree) calPanel.setText("3");
     if(src == calFour) calPanel.setText("4");
     if(src == calFive) calPanel.setText("5");
     if(src == calSix) calPanel.setText("6");
     if(src == calSeven) calPanel.setText("7");
     if(src == calEight) calPanel.setText("8");
     if(src == calNine) calPanel.setText("9");
     if(src == calAdd) calPanel.setText("+");
     if(src == calSub) calPanel.setText("-");
     if(src == calMul) calPanel.setText("*");
     if(src == calDev) calPanel.setText("/");
     if(src == calDec) calPanel.setText(".");
     if(src == calEquals) calPanel.setText("=");
     if(src == calClear) calPanel.setText("c");
     if(src == calSqr) calPanel.setText("sqr");
     if(src == calPercent) calPanel.setText("%");                         
}

Well,
ata the end of init() method add two lines:
doLayout();
validate();

Similar Messages

  • Why the appletViewer not working

    i want to run my applet program through AppletViewer, but when I type
    AppletViewer tree.html, there is no error, but nothing promp up too,
    if I use the broswer IE to run the tree.html file, it is work
    any one know why I can not use the appletViewer to see the applet?

    hi, thanks your reply
    yes, I had give the resource code to the file
    <html>
    <applet code = tree.class height = 600 width = 600>
    </html>
    so, are there any other work I need to insert?hi,
    the code is okay but you might have to make it like this:
    /*<html>
    <applet code = "tree.class" height = 600 width = 600>
    </html>*/because it does not need to be complied.
    with this much and the command,
    appletviewer tree.java
    at the command line would work fine.
    hope you get through.
    P.S. if you are having problems, please try posting the error too.
    [email protected]

  • Why can't I make my applets work in Explorer?

    I know this is stupid but I've really checked almost every source to see what the problem is.. But it doesnt work... Here it is:
    I write really really simple, "hello world" kinda applets just to see the java environment and stuff. I compile them using "javac" program. I view them using "appletviewer" in an applet window. But I can't see them in an explorer window, am I dumb or what? I checked my HTML code and I don't think there's a problem in it.The class name's correct, the path -i use codebase="."- is so... But I still see the error "class: blahblah not found" in explorer. Ok, there must be a prob. in my coding somewhere,but how do I view the working applet in "appletviewer"?

    HTML is based on relative paths, so in the
    codebase= make sure that you are using the
    correct location, and if you are using a relative path
    that the .class file actually is in that path.
    Folder: HTML
    Folder: java
    File: applet.class
    Folder: pages
    File: appletTest.html
    In the appletTest.html file in the applet tag, if I
    use the code=applet.class then it is looking for it in
    the "pages" folder and not where it actually is.
    To fix this, simply change the codebase to point to
    "../java" and then it will work, or you could just
    move the applet file to the "pages" folder.
    Make sure it is the .class file and not the
    .java source code.

  • Signed applet runs in Firefox but not in Internet Explorer

    I've signed an applet with
    keytool -genkey -validity 3650 -keyalg rsa -alias ddkey
    keytool -export -alias ddkey -file ddcert.crt
    jarsigner planner.jar ddkey
    jarsigner -verify -verbose -certs planner.jar
    but loaded from the webserver with...
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Planner </TITLE>
    </HEAD>
    <BODY>
    <APPLET CODE="mypack/Planner.class" ARCHIVE="planner.jar" WIDTH="100%" HEIGHT="100%">
    <PARAM name="customer" value="mycustomer">
    </APPLET>
    </BODY>
    </HTML>
    .... the applet only works with firefox and not in Internet Explorer. Even with a new certificate, IE does not ask me whether I trust the applet or not. Only a blank screen with a red cross..
    In spite of having configured "show Java console", the Java console is NOT opened in the task bar, so I cannot add further log messages....
    Why do the two browsers behave differently?? How can I fix it?
    Appreciate any hint :-)

    When I see "it doesn't work in IE" I always have to ask: Windows 7? 64 bits system? Are you sure you are running this in the 64 bits internet explorer? The default IE is the 32 bits version, so if you don't have a 32 bits Java runtime installed applets are not going to work at all, signed or otherwise.

  • Applet HelloWorld class HelloWorld could not be loaded.

    Dear Colleagues
    I am very new to Java, but have followed the advice of a number of people here and read one or two tutorials.
    I thought I had managed to write my first HelloWorld! application/applet in that I can see HelloWorld.java and HelloWorld.class in the bin folder in MS-DOS, but once I had coded the HTML page to view it (both in Netscape and Explorer) I received the following message in the status bar:
    Applet HelloWorld class HelloWorld could not be loaded.
    The HTML page has been written exactly as it should be and the HelloWorldApp class file, the HelloWorldApp (File for Forte for Java), the HelloWorld (File for Forte for Java), and the HTML page are all located together in the bin folder of the jdk1.3.1 directory.
    In my C:\Autoexec.bat file I have the following:
    SET BLASTER=A220 I7 D1 T2
    SET SNDSCAPE=C:\WINDOWS
    rem - By Windows Setup - C:\WINDOWS\COMMAND\MSCDEX.EXE /D:CD1
    @ECHO OFF
    PROMPT $P$G
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.3\BIN
    SET PATH=%PATH%;C:\WINDOWS\Twain_32\Scanwiz;C:\WINDOWS\Twain\Scanwiz
    SET PATH=%PATH%;C:\PROGRA~1\COMMON~1\MDLSHA~1\ISIS
    SET CLASSPATH=
    Any advice on what I am doing wrong would be appreciated.
    Thank you.
    Steve Higham

    The could be several things here that are the problem. Firstly doe the applet runb using the appletviewer. If so then there is problably a problem with the HTML code you are using to call the Applet. If the HTML file esides in a different directory than the .class file then make sure the 'CODEBASE' field points to the directory containing the .class file. Can you post your HTML for us to see?
    Ash..

  • Not running internet explorer in windows 8

    Help! Can't get flash player to run on IE 11 and get the message "not running Internet Explorer in Windows 8"

    This is a known problem with Internet Explorer 11, which Microsoft has been aware of since October 18 when they released their latest "untested" browser. The pages can't recognize the browser, so they don't recognize any of the plugins, like Flash Player. So far, Microsoft has made NO indication that they have any plan to fix it soon.
    Microsoft's recommendation is to use Compatibility View for affected pages, and "pretend" you're using an different browser. Trouble with that is it has seen limited success at best, and you have to individually enable it for EVERY page that has problems.
    I'm not big on "pretending" so I recommend actually using another browser.
    Firefox (from Mozilla)
    Opera (from Opera)
    Safari (from Apple)
    Chrome (from Google)
    ANY of those will work where IE11 won't, with the Flash Player Plug-in (For all other browsers), and Chrome doesn't even need that because it has its own Flash Player plugin built in.

  • My applet works in the appletviewer but not in the navigator

    My applet works in the appletviewer but not in the navigator
    exceptions problem1 and problem2 are throwed
    this is my code
    import java.applet.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ValiderHtml extends Applet implements ActionListener {
    JButton send =new JButton("Connexion");
    JScrollPane jscrollpane= new JScrollPane();
    DefaultListModel lignes=new DefaultListModel();
    JList lstURL = new JList(lignes);
    BufferedReader reader = null;
    String ligne;
    URL url;
    URLConnection conn;
       public void init(){   
       this.setSize(900,400);
       setLayout( new GridLayout(2,1));
       jscrollpane.setBounds(new Rectangle(19,53,160,73));
       jscrollpane.getViewport().add(lstURL,null);
       send.addActionListener(this);
            this.add(send);
       this.add(jscrollpane);
        public void actionPerformed(ActionEvent evt) {
             Send();
       public void Send(){
            try {
       url=new URL("http://www.developpez.com");
       conn = url.openConnection();
       reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    while ((ligne = reader.readLine()) != null) {
                     lignes.addElement(ligne);
        }//fin bloc try
       catch (Exception e) {
                   lignes.addElement("probleme1");     
                finally{
                   try{reader.close();}catch(Exception e){ lignes.addElement("probleme2");}
       }// fin Send
          public void paint(Graphics g) {
                super.paint(g);
    }// fin Applet

    As for tracking the source of your problem your applet sucks.
    Try e.printStackTrace() on a cought exception and check the (full) trace.
    url=new URL("http://www.developpez.com");
    Unless yor applet is on www.developpez.com this will throw an exception in an unsigned
    applet without special policies.
    Signing applets:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post and last post for the java class file
    http://forum.java.sun.com/thread.jsp?forum=63&thread=409341
    4th post explaining how to set up your own policy with your own keystore

  • Applet working perfectly in the appletviewer but not in the browser

    I have tried everthing that came upto mind to get the applet working in the browser, which includes
    using of the HTML Converter, downloading the java plugin, newest netscape nevigator6.23 and installing j2sdk 14. still i am unable to get the applet working in the browser where as it works perfectly fine in the appletviewer. Applet takes the gif name and the time deplay to dipaly the pictures after the delay.

    Can we see the HTML source code .and hope ur using the <object > or <embed> tag ..

  • (applet,thin driver): IE works, appletviewer not; driver location?

    Hi,
    there are a lot of questions around this topic but I couldn't find a specific answer to this:
    I programmed an applet under WinNT (connection to Oracle 8i thru thin driver) and keep the Oracle drivers in the ..\Ora8i\jdbc\lib\ place (ZIPped), classpath set correctly.
    The applet works fine in IE on my local machine, but not in the appletviewer (it can't find the driver class). Without applet-specific part it works fine using 'java ...'.
    I use the suggested 'import oracle.jdbc.driver.OracleDriver' statement.
    2nd question: since this applet is supposed to run on a webserver (and not only my local machine...), where do I place the driver (class or whole zip-file?) and how do I tell the main class / applet where to look for it instead of Ora8i\jdbc\lib\ ?
    Thanks for any help!!

    There's a fair amount of fiddling you can do with packets sent over the network by SQL*Net, but that requires the OCI driver. The thin driver is writing out Oracle's wire protocol which isn't publicly documented.
    The OCI driver is going to be faster in general than the thin driver, and you're going to have more flexibility to optimize its network traffic.
    Justin

  • Applet works in appletviewer but not in IE - Applet notinited

    Hi, i have written a simple applet which uses swing components, ie swing labels and buttons. The buttons and labels also have icons with the text. The icons are in a folder called "icons" inside the same folder that the class is in. Everything works fine in the appletviewer, the icons are all displayed correctly, however when i try to open it through Internet Explorer i get this error in the java console window:
    Java(TM) Plug-in: Version 1.4.0
    Using JRE version 1.4.0 Java HotSpot(TM) Client VM
    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
    x: clear classloader cache
    0-5: set trace level to <n>
    java.security.AccessControlException: access denied (java.io.FilePermission icons/world.jpg read)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
         at java.lang.SecurityManager.checkRead(SecurityManager.java:887)
         at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:408)
         at sun.awt.SunToolkit.getImage(SunToolkit.java:422)
         at javax.swing.ImageIcon.<init>(ImageIcon.java:81)
         at javax.swing.ImageIcon.<init>(ImageIcon.java:107)
         at atm.init(atm.java:23)
         at sun.applet.AppletPanel.run(AppletPanel.java:341)
         at java.lang.Thread.run(Thread.java:536)
    Can anyone help me with this problem? I desperately need this applet working in the browser and not just the appletviewer.
    Many thanks in advance,
    Adrian

    Hi, i don't think it is a problem with the security settings, the problem definately lies in these lines
    inside the init method:
         Icon worldIcon = new ImageIcon(getDocumentBase(),"icons/world.jpg");
         JLabel myIconLbl = new JLabel("My Icon and Label", worldIcon, SwingConstants.CENTER);     
    add(myIconLbl);
    If i take the ' getDocumentBase() ' part out of the first line, the applet compiles and the worldIcon is correctly displayed in the appletviewer but not in Internet Explorer (the problem i orriginally sited).
    However by leaving the getDocumentBase() line in the code, the applet correctly compiles but does not show the icons at all in either appletviewer or IE!!
    Any suggestions?
    Adrian

  • Applet works on appletviewer but not browser

    Hi,
    I have just started using Java. I'm so new the only program I've tried to compile and run is "Hello World". I'm already having problems running the applet. I'm using Java 2 SDK on Windows 2000. The applet works just fine on appletviewer, but I can't get it to work on Netscape or MS Internet Explorer. What am I missing?

    posting stuff like the error message you get, and a section of the html page might help.

  • Applet works on eclipse but not on reg browser (not inited error)

    Hi everybody,
    I've just made an applet, but I don't know why it can't be shown. I'm working with Eclipse, and when I run the .java file, everything works fine. It even works fine when I specify parameters through the eclipse build file parameter arguments.
    Now I would like this to work by using the appletviewer and my html file. When I do this, the application doesn't work anymore and I get this error: Start applet not inited and shows loading java Applet failed when I scroll over to the java applet box on the browser. (Mozilla)
    I used this code in the html file:
    <html>
    <head>
    <title>MicroToolBus Example Plugin Applet 2 </title>
    </head>
    <body>
    <h1>MicroToolBus Example Plugin Applet 2 </h1>
    <hr>
    <applet code =MicroToolBus.class width=400 height=100>
    <param name="ModelName" value="edu.vt.vbi.pathport.client.plugin.microarray.MicroarrayModel">
         <param name="DataLocation" value="c:/eclipse/workspace/PathPort/xml/samples/mageml/pmml.xml">
    </applet>
    </hr>
    </body>
    </html>
    which is located at
    C:\eclipse\workspace\PathPort\build\edu\vt\vbi\pathport\client\toolbus\MicroToolBus.html
    The MicroToolBus.class file is located in the same directory. What am I doing wrong. I tried putting the class file and the html in the same directory as the actual .java file of the applet, but that didn't seem to work either. Thanks in advance; your help and suggestions are much appreciated,

    What am I doing wrong?Your getting caught in the Sun/Microsoft war. Numerous casualties. For rehab, see:
    http://www.MartinRinehart.com
    Click "Articles", "Launching Applets".
    Warning: make a big mug of java before you start. This is not trivial stuff.

  • Applet works in applet viewer but not browser...why?

    I won't go into the code, but here's my problem: I work on my applet using Eclipse and its appletviewer, and the applet works fine. I test my applet once in a while by packing all class files and graphics into a jar file, copying it and html file to my desktop and opening the html file. Before, this would work (the applet would get all its info from the jar file), but now... I get a nullpointer exception when I open the browser. If this were to happen in Eclipse, I'd have some way of tracking it. Is there some way of tracking this problem when its seen in a browser?

    here's certain key parts of my code... I think this whole "applet not working outside of the project folder" thing started ever since I changed my init() and start() functions so...
         public void init()
              t = new Thread(this);
              t.start();
              addKeyListener(this);
              addMouseListener(this);
              addMouseMotionListener(this);
              sound = new SoundList(); 
         public void start()
              URL resdir;     
              resdir = getClass().getResource("Graphics/Spacebackdrop_01.jpg");
              backgrndImg = new ImageIcon(resdir);
                   resdir = getClass().getResource("Graphics/Ship_Blue.gif");
              player1 = new Ship(100, 300, new ImageIcon(resdir), this,
                        gameRect, sound);
              player1.setOrientation(90);
              resdir = getClass().getResource("Graphics/Ship_Green.png");
              player2 = new Ship(700, 300, new ImageIcon(resdir), this,
                        gameRect, sound);
              player2.setOrientation(270);
              resdir = getClass().getResource("Graphics/Ball.gif");
              ball = new Ball(50, 50, new ImageIcon(resdir), this,
                          gameRect, sound);
              initMenus();
              //Initialize the goals
              resdir = getClass().getResource("Graphics/Goalpost.png");
              ImageIcon goalImg = new ImageIcon(resdir);
              goal1 = new Goal(8, gameRect.height/2, 100, goalImg, this);
              goal2 = new Goal(gameRect.width - 8, gameRect.height/2, 100, goalImg, this);
              font = new Font("Verdana", Font.BOLD, 16);
         public void initMenus()
              startMenu = new Menu();
              pauseMenu = new Menu();     
              confirmMenu = new Menu();
              int setY = 200;
              ImageIcon img = new ImageIcon(getClass().getResource("Graphics/newgame.png"));
              ImageIcon imgRoll = new ImageIcon(getClass().getResource("Graphics/newgame_h.png"));
              ImageIcon imgPressed = new ImageIcon(getClass().getResource("Graphics/newgame_p.png"));
              startMenu.addCenteredButton(img, imgRoll, imgPressed, setY, 0, gameRect.width);
              pauseMenu.addCenteredButton(img, imgRoll, imgPressed, setY, 0, gameRect.width);
              setY += 20;
              img = new ImageIcon(getClass().getResource("Graphics/resumegame.png"));
              imgRoll = new ImageIcon(getClass().getResource("Graphics/resumegame_h.png"));
              imgPressed = new ImageIcon(getClass().getResource("Graphics/resumegame_p.png"));
              pauseMenu.addCenteredButton(img, imgRoll, imgPressed, setY, 0, gameRect.width);
              img = new ImageIcon(getClass().getResource("Graphics/Yes.png"));
              imgRoll = new ImageIcon(getClass().getResource("Graphics/Yes_h.png"));
              imgPressed = new ImageIcon(getClass().getResource("Graphics/Yes_p.png"));
              setY += 25;
              int imgWidth = img.getIconWidth();
              confirmMenu.addButton(img, imgRoll, imgPressed, gameRect.width/2 - imgWidth, setY);
              //startMenu.activate(); //make starmenu active.
              img = new ImageIcon(getClass().getResource("Graphics/No.png"));
              imgRoll = new ImageIcon(getClass().getResource("Graphics/No_h.png"));
              imgPressed = new ImageIcon(getClass().getResource("Graphics/No_p.png"));
              confirmMenu.addButton(img, imgRoll, imgPressed, gameRect.width/2 + 2, setY);
         }

  • Applets work under older compilers, but not newest

    The applets I compile using the latest release of javac (with the JDK 1.4 package) work in the appletviewer but not in IE 6.0. However, if I use an older version of javac from a couple years ago (not sure the version), the applets work in IE suddenly. Is there something I need to install in IE to make it compatible with the Sun 1.4 javac compiler? Should I just reinstall the JRE? Has anyone heard of this before? Thanks!!

    You could try installing the Java 1.4 plugin.
    http://java.sun.com/getjava/

  • Applet works in JDeveloper, but not when deployed to OC4J

    I am working on an applet version of the BI Beans java client application. It works fine when running in JDeveloper (applet viewer), but fails when deployed to OC4J. The applet shows a red X, with a message in the status bar saying "Loading Java Applet Failed...". Contents of java console are as follows:
    java.lang.NoClassDefFoundError: oracle/dss/selection/step/Step
         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)
    Any one have any ideas how to chase this one down?
    Here is the message that JDeveloper shows when it runs the applet. I have gone thru this and ensured that all these references are selected in my .deploy settings:
    C:\JDeveloper\jdk\bin\javaw.exe -ojvm -Xbootclasspath/a:C:\dev\jdev\Workspace1\TestClientApp\classes;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\biaddinsrt.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\biamlocal.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bicmn.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bidataclt.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bidatacmn.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bidatasvr.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\biext.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bipres.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bidata-nls.zip;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bipres-nls.zip;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bicmn-nls.zip;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\biaddins-nls.zip;
    C:\JDeveloper\jdev\lib\ext\..\..\..\jlib\LW_PfjBean.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\jlib\share.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\jlib\jewt4.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\jlib\jewt4-nls.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\infobus\lib\infobus.jar;
    C:\JDeveloper\BC4J\lib\bc4jmt.jar;C:\JDeveloper\BC4J\lib\collections.jar;
    C:\JDeveloper\BC4J\lib\bc4jct.jar;
    C:\JDeveloper\lib\xmlparserv2.jar;
    C:\JDeveloper\jlib\jdev-cm.jar;
    C:\JDeveloper\j2ee\home\lib\jndi.jar;
    C:\JDeveloper\jlib\regexp.jar;
    C:\JDeveloper\jlib\share.jar;
    C:\JDeveloper\jlib\uix2.jar;
    C:\JDeveloper\jdbc\lib\classes12.jar;
    C:\JDeveloper\jdbc\lib\nls_charset12.jar;
    C:\JDeveloper\j2ee\home\lib\ojsp.jar;
    C:\JDeveloper\j2ee\home\jsp\lib\taglib\ojsputil.jar;
    C:\JDeveloper\j2ee\home\oc4j.jar;
    C:\JDeveloper\j2ee\home\lib\servlet.jar;
    C:\JDeveloper\jdev\lib\ojc.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\olap_api_92.jar;
    C:\JDeveloper\jdev\lib\jdev-rt.jar;
    C:\JDeveloper\BC4J\lib\bc4jhtml.jar;
    C:\JDeveloper\BC4J\lib\datatags.jar;
    C:\JDeveloper\BC4J\lib\bc4juixtags.jar;
    C:\JDeveloper\BC4J\lib\bc4j_jclient_common.jar
    Any assistance would be appreciated.
    s.l.

    i have the same problem
    i cant load my applet on OC4J , i am wondering know how Oracle canot solve this problem

Maybe you are looking for