Slow Applet init in IE

Hi dudes,
i have a problem with applet.. it's no a true problem, but it's an annoying problem. I have an applet that work in IE. When it's start with focus on and with maximixe window the applet load very slowly and CPU usage in very busy (88%-100%). When i start the applet with window minimized, it's load very fastly. It's a problem becuase my application needs to start in full screen mode....
You have some suggestions?
Thank you. Matte

I can't post it beacuase it's a commercial program for my company.
        UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
        enableEvents(AWTEvent.WINDOW_EVENT_MASK);
        Container contentPane  = this.getContentPane();
        contentPane.setLayout(null);
        String value = (String)this.getParameter("file");
        event_root1 = DNDTree.createTree(true,1,null,1);
        eventi1.addMouseListener(new Editor_eventi1_mouseAdapter(this));
        (DefaultMutableTreeNode) eventi1.getModel().getRoot(),new ArrayList());
        event_root2 = DNDTree.createTree(false,1,null,1);
        eventi2 = new DNDTree(event_root2,2);
        jScrollPane1 = new JScrollPane(tree1);
        jScrollPane2 = new JScrollPane(tree2);
        jScrollPane1.setViewportBorder(null);
        jScrollPane1.setAutoscrolls(true);
        jScrollPane1.setBorder(border2);
        jScrollPane1.setToolTipText("");
        jScrollPane1.setBounds(new Rectangle(50, 10, 320, 390));
        jScrollPane2.getViewport().setBackground(Color.white);
        jScrollPane2.setBorder(border2);
        jScrollPane2.setBounds(new Rectangle(400, 10, 320, 390));
        jScrollPane5 = new JScrollPane(eventi1);
        jScrollPane5.getViewport().setBackground(Color.white);
        jScrollPane5.setBorder(border2);
        jScrollPane5.setBounds(new Rectangle(50, 10, 320, 390));
        jScrollPane6= new JScrollPane(eventi2);
        jScrollPane6.getViewport().setBackground(Color.white);
        jScrollPane6.setBorder(border2);
        jScrollPane6.setBounds(new Rectangle(400, 10, 320, 390));
        Menu_Disponibili = new JPopupMenu();
        Menu_Disponibili.setBackground(new Color(212, 208, 200));
        Menu_Disponibili.setFont(new java.awt.Font("Tahoma", Font.PLAIN, 11));
        Menu_Disponibili.setToolTipText("Opzioni di inserimento");
        Menu_Disponibili.setInvoker(null);
        Menu_Disponibili.addMouseListener(new Editor_Menu_Disponibili_mouseAdapter(this));
        Item_Expande.setText("Espandi");
        Item_Expande.addActionListener(new Editor_Item_Expande_actionAdapter(this));
        Item_Collapse.setText("Compatta");
        Item_Collapse.addActionListener(new Editor_Item_Collapse_actionAdapter(this));
        Item_Add.setText("Aggiungi");
        Item_Add.addActionListener(new Editor_Item_Add_actionAdapter(this));
        VTextIcon textIcon = new VTextIcon(jLabel1, "OGGETTI DISPONIBILI",VTextIcon.ROTATE_NONE,220,220,198);
        jLabel1 = new JLabel(textIcon);
        jLabel1.setBackground(Color.darkGray);
        jLabel1.setFont(new java.awt.Font("Tahoma", Font.BOLD, 12));
        jLabel1.setForeground(Color.darkGray);
        jLabel1.setBorder(border2);
        jLabel1.setDisabledIcon(textIcon);
        jLabel1.setBounds(new Rectangle(31, 10, 20, 390));
        VTextIcon textIcon2 = new VTextIcon(jLabel2, "OGGETTI SELEZIONATI",VTextIcon.ROTATE_NONE,220,220,198);
        jLabel2 = new JLabel(textIcon2);
        jLabel2.setFont(new java.awt.Font("Tahoma", Font.BOLD, 12));
        jLabel2.setForeground(Color.darkGray);
        jLabel2.setBorder(border2);
        jLabel2.setHorizontalAlignment(SwingConstants.CENTER);
        jLabel2.setHorizontalTextPosition(SwingConstants.CENTER);
        jLabel2.setVerticalAlignment(SwingConstants.CENTER);
        jLabel2.setBounds(new Rectangle(719, 10, 20, 390));
        VTextIcon textIcon3 = new VTextIcon(jLabel6, "GRUPPI",VTextIcon.ROTATE_NONE,220,220,198);
        jLabel6 = new JLabel(textIcon3);
        jLabel6.setBackground(Color.darkGray);
        jLabel6.setFont(new java.awt.Font("Tahoma", Font.BOLD, 12));
        jLabel6.setForeground(Color.darkGray);
        jLabel6.setBorder(border2);
        jLabel6.setText("");
        jLabel6.setBounds(new Rectangle(31, 10, 20, 390));
        progressBarControl = new ProgressBarControl(ProgressBar,ProgressLabel);
        progressBarControl.reset();
        jTabbedPane1.setSelectedIndex(0);It's very strange, because it's works perfectly when execute it on a minimize window (CPU USAGE DOWN TO 40%-55%), while with a maximized window it's works very slowly and cpu usage go to 95%-100% it's very frustrating....

Similar Messages

  • Very slow applets on Safari 5 and 1.6.20 - works fine in Firefox

    Hello,
    Has anyone else noticed very slow applets in safari 5? I'm running 1.6.0_20 and trying run any of the applets at http://openprocessing.org results in VERY slow applet performance.
    If i load the same applets in Firefox things run smoothly.
    For example, load this one in both and see the difference:
    http://openprocessing.org/visuals/?visualID=9151
    The motion in Safari 5 is jerky and not fluid at all. But in firefox it runs nice and smooth. Even in Chrome it's jerky just like Safari.
    I've tried both the 32/64 bit version settings and still the same result in Safari.
    Thanks..

    HI,
    Open Java Preferences (Applications/Utilities) Select the Network tab
    Click: Delete files
    Relaunch Safari.
    And empty the Safari cache from the Safari menu.
    Could be the site itself. An HTML validator came up with errors.
    http://validator.w3.org/check?uri=http%3A%2F%2Fopenprocessing.org%2Fvisuals%2F%3 FvisualID%3D9151&charset=%28detect+automatically%29&doctype=Inline&group=0
    Carolyn

  • Applet Init Performance

    Hi,
    I am new to Applets.
    Every time I access an Applet browser downloads all related classes. Can I do something so that if the classes are not modified then the browser uses the cached copy instead of downloading again and again?
    Thanx in advance.
    San

    Thanks dekassegui,
    Your suggested method was useful.
    I have my own jar files and also a weblogic.jar file. I have used your method for all my jar files and it works fine. But I have no idea how should I include weblogic.jar in that cache list. It is not under the same CODEBASE as my jar files. Most of the time taken by applet init is for classes from weblogic.jar
    By the way I am using Weblogic 7.0 and my client GUI is an Applet that connects back to an RMI server hosted by Weblogic.

  • J2SE 5.0 plugin and slow applet load time

    Folks,
    I have an applet (https), with about 5 MB of jar files. After we
    moved to J2SE 5.0, the load time seems much slower. It used to load in
    40 seconds. Now it loads in 4 min.
    An odd thing I noticed is when I minimize my Internet Explorer window,
    the applet seems to start up quickly again.
    Is this possibly related to the "starburst logo" progress bar
    animation that Sun now uses for applet start ups? I know that
    animated gifs can sometimes chew up quite a bit of cpu time.
    I think the progressbar property is no longer in 5.0
    I'm running on a single proc laptop. When I run it on my 2 proc
    server, it is not as obvious, and startup time seems reasonable.
    Thanks,
    Rob
    [email protected]

    I'm also seeing a similar slow applet startup time. CPU is 100% (IE is in high 90s). Works ok on my 3GHz P4, but is very slow (up to 16 minutes) on 400 MHz P2.
    My problem seems to be related to how my .properties files (23 total, for internationalization support) are handled.
    During start-up in JRE 1.5 I see the following for each .properties file:
    network: Connecting http://dummy.com/demos/AES/1_4_2_06/fax.class with proxy=DIRECT
    network: Connecting http://dummy.com/demos/AES/1_4_2_06/fax.class with cookie "PHPSESSID=e4aad164588f860e495812ec5c52326c"
    network: Server http://dummy.com/demos/AES/1_4_2_06/fax.class requesting to set-cookie with "PHPSESSID=e4aad164588f860e495812ec5c52326c; path=/"
    network: Connecting http://dummy.com/demos/AES/1_4_2_06/fax_en.class with proxy=DIRECT
    network: Connecting http://dummy.com/demos/AES/1_4_2_06/fax_en.class with cookie "PHPSESSID=e4aad164588f860e495812ec5c52326c"
    network: Server http://dummy.com/demos/AES/1_4_2_06/fax_en.class requesting to set-cookie with "PHPSESSID=e4aad164588f860e495812ec5c52326c; path=/"
    network: Connecting http://dummy.com/demos/AES/1_4_2_06/fax_en.properties with proxy=DIRECT
    network: Connecting http://dummy.com/demos/AES/1_4_2_06/fax_en.properties with cookie "PHPSESSID=e4aad164588f860e495812ec5c52326c"
    network: Server http://dummy.com/demos/AES/1_4_2_06/fax_en.properties requesting to set-cookie with "PHPSESSID=e4aad164588f860e495812ec5c52326c; path=/"
    network: Connecting http://dummy.com/demos/AES/1_4_2_06/fax_en_US.class with proxy=DIRECT
    network: Connecting http://dummy.com/demos/AES/1_4_2_06/fax_en_US.class with cookie "PHPSESSID=e4aad164588f860e495812ec5c52326c"
    network: Server http://dummy.com/demos/AES/1_4_2_06/fax_en_US.class requesting to set-cookie with "PHPSESSID=e4aad164588f860e495812ec5c52326c; path=/"
    network: Connecting http://dummy.com/demos/AES/1_4_2_06/fax_en_US.properties with proxy=DIRECT
    network: Connecting http://dummy.com/demos/AES/1_4_2_06/fax_en_US.properties with cookie "PHPSESSID=e4aad164588f860e495812ec5c52326c"
    network: Server http://dummy.com/demos/AES/1_4_2_06/fax_en_US.properties requesting to set-cookie with "PHPSESSID=e4aad164588f860e495812ec5c52326c; path=/"
    The file (1 of 23) I supply is named fax.properties (the default file). Since my locale setting are English/US I guess the I18N code is trying to figure out if the regional files are present. Each of these requests is timing out 5-8 seconds for each - it builds up quickly.
    I haven't been able to find out why this is happening or resolve the issue. I'm close to restricting my applet to only 1.4.2 as that was fine and posting this as a bug.

  • Applet inits very slow on jre 5.x

    I have a JApplet that inits fine under JRE1.4.2_0x - it loads in 2-3 seconds even when accepting the certificate and jars are caching for the first time. When I update to JRE 5.x though, it takes about a minute until I get to the dialog to accept the certificate, and then it takes several minutes more for the applet to init.
    Once I accept the certificate, and jars are cached, then it loads fine even under JRE 5.x, but this initial process is so slow that it is not acceptable for our users.
    It seems to be related (and maybe I'm wrong) to the JAVA spinning logo that gets displayed on JRE 5.x plugin. When I get that screen (because I must first accept certificate) then it is very slow, and when I don't get that screen (because certificate have been accepted and jars are cached) then everything works just fine.
    Has anyone come across this issue ? If anyone knows how to turn off that initial screen, I would love to know how.
    thanks in advance !

    thanks for your reply. I have fixed it by forcing that spinning logo to not show up - to do so, you can specify your own image (gif or jpeg) to be displayed in that area. Now that not all CPU time are taken up by the spinning logo, my applet loads just fine.
    I will test the Mustang later and let you know, but even with JRE 5, you can fix it by specifying a special applet attribute ("image").
    http://java.sun.com/j2se/1.5.0/docs/guide/plugin/developer_guide/special_attributes.html#boxmessage
    - ro

  • Slow Applet

    this has got to be one of the simplest applets, yet it takes over 10 minutes to run the second part.
    here's the source
    (done in netbeans, I'm a newb)
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.Applet;
    public class gpaApplet extends java.applet.Applet implements ActionListener {
      public Button sub=new Button("Submit");
      public TextField number=new TextField(5);
    public void init() {
    setLayout(new FlowLayout());
    add(number);
    add(sub);
    sub.addActionListener(this);
    public void actionPerformed(java.awt.event.ActionEvent a) {
    if (a.getSource()==sub) {
    int num=3, index=0;
    TextField[] ta = new TextField[num];
    remove(number);
    remove(sub);
    setLayout(new FlowLayout());
    add(ta[0]);
    }this is not all of what i plan to do with it, but i need this to work in order to do what i plan to do. after it removes the textfield and the button (number and sub), it takes 10 minutes+ (i never waited to see how long it takes, all i know is that its still trying after the 10 minutes but still hasnt displayed anything to the screen) to display just 1 textfield from the array.
    when i dont use arrays, and i just make 1 textfield and display it (after removing the textfield and button) it takes about 2 -3 minutes to display the textfield,
    i've tried it on 3 computers, one of which was a 3 ghz machine with 1 gig of ram. so i dont see why its soooo daam slow
    can someone please help me solve this problem?

    ok, now the problem arises here. i need to make the "num" number of textfields, based on whatever is input (i'll add that code later, after i get this to work).
    so how do i make as many textfields as i want? i tried putting a "for" loop within...
    TextField[] ta = new TextField[] {
    //for loop goes here
    }i tried putting that loop in there, but it would not allow it. gave some kind of error.
    so my question. how do i make as many textfields as i want, based on the number that the user enters.

  • Slow applet on Vista & 7

    Hi everyone,
    this is my first thread so i hope i got the right section :).
    I used to work on a Windows XP station where i was using applets that were quite fast but now i'm working on Windows 7 and those applets are slow and the same thing happen on Vista.
    The JRE are 1.6.12 on both environment and the problem occur on both IE and Firefox.
    I already look over the forum but i couldn't find a solution so i hope you can help me .
    Thanks,
    Ator
    PS: Sorry for my english :)

    I have an iPhone 4 and since upgrading to iOS 7 I am also having a lot of trouble with my cellular network. I am with one of the big 3 Telcos in Canada. I get full bars but my service is either slow or non-responsive. Some of my apps claim that the network has dropped even though I have full bars and no interference. I have surfed around for a solution and have not found any solid advice yet. I have more than half of my phones storage free.
    Any advice?

  • Slow applet--HELP!

    My entire project has skidded to a halt because of this problem, so I need help right away!
    The problem:
    A very simple applet is running very slowly. All it does is display a custom component.
    How can I speed it up without losing encapsulation?
    public class ArrowTest extends Applet{
       Arrow a = new Arrow();
       add(a);
    }The component is a lightweight custom component, which is also very simple. It has a anonymous listener class in its constructor (MouseMotionListener) which causes the Arrow to rotate when the mouse is clicked and dragged. (this involves lots of Math.cos, Math.sin, etc., but not THAT much) However when I dragged my mouse on the arrow's area, the rotation was slow and choppy. I would drag the mouse, and about 10 seconds later, the arrow would notice and flip right to where I ended, not showing the in-between steps.
    The applet ran fine (smoothly and with a fast response) on my computer in the applet viewer. It also worked fine when I ftp'd it to my html server and ran it. It worked badly at school, which is the ultimate destination of this applet. The school's computers are not much slower than my testing computer. I know that the html servers are extremely busy/slow, but I thought that the entire applet was loaded into memory so that once it was started, the server's business was done?
    Is there any case in which the applet needs to go back to the HTML server once it has loaded the applet?
    I had planned to put many such arrows on the screen concurrently, and even pack it into another custom component. But if I can't even display one arrow, my entire project is on the skids.
    How can I speed this up?
    Can I make it such that the user has to download pieces of my applet and store it on their computer somewhere, so that I can help this slow HTML server (so that it sends less info)?
    Thanks in advance!
    :) jenMc

    thank you for replying!
    However, I'm not sure what you're suggesting?
    The event handler, which is part of the component, calls repaint() (the component's paint and update methods). The rotation is intended to be packaged as part of the arrow's default behavior, in the same sense as a button's default behavior is such that if you click on a button you see the image of the button go "up and down". You do not assign a event handler to do this; it is part of the component. Supposedly when you do this, the applet only reloads the area within the clip bounds of the component?
    I do not want to draw an arrow by calling getGraphics(). That would ruin the encapsulation. Another words, I want to add an arrow to the screen by simply saying
    add(arrow);
    not by having to write an arrow algorithm every time I want to use an arrow, which is most of the time, since that's my base class for Vector, Force, Acceleration, Velocity, etc. classes.
    I don't want the caller to be responsible for repainting or painting or anything.
    Am I totally not understanding your suggestion? If I am, please correct me.
    :) Jen

  • BAM tab view report is very slow on inital display (1+ minutes)

    I have a BAM installation that has multiple different "dashboards" using tabbed report views to display separate metric values from one generic data object. These "dashboards" are being accessed directly through a web browser using the generated link for each report (and not through the BAM Active Viewer or Active Studio tools). Regardless of which of the "dashboards" I choose, the initial display takes a long time to complete. It takes about 20-40 seconds before the "opening..." message shows in the browser window, then another 20-30 seconds (depending on the complexity of the tabbed report and number of views) to complete the display. However, after this initial display, I can select other tabs on the current report or select a different report to display, and it will complete in 10-15 seconds. (Actually, every report display used to take over a minute, but setting the IIS - HTTP Headers - Content Expiration to "Expire after 365 days" allowed the succeeding report displays to improve. Now, it is just the initial display that takes too long).
    What is being done on the initial access of the BAM report that takes such a long time? I have seen a bunch of (temporary internet) files being loaded that, if I remove them, the response time is slow again for the next "dashboard" that I display. Is there any way to improve this response time?

    What kind of views are you using and what is the source of your data?
    Is there too much data in your BAM DOs?
    Have you created indices?

  • Applet init problem

    Hi,
    I work on an tool which is implemented as a applet.
    When i would start the applet i became errors like following from the java console :
    java.lang.NoClassDefFoundError..............
    if i update my current html view with the reload button on my browser sometimes the applet started successful.
    has anyone a idea??
    here is my html file:
    <HTML>
    <BODY>
    <APPLET code="RequirementClient.class" width=99% height=99%></APPLET>
    </BODY>
    </HTML>
    here 's my file list on my web directory:
    http://localhost/RequirementTool/RequirementClient.html
    http://localhost/RequirementTool/RequirementCient.class
    http://localhost/RequirementTool/packages/
    and so on
    Thanks a lot:

    cross-post
    http://forum.java.sun.com/thread.jsp?forum=31&thread=481259&tstart=0&trange=15

  • Java 1.5 and slow applet loading

    Ever since i switch to Java 1.5, i have noticed that the time to load an Applet has increase dramatically..even small simple Applet. What would normally takes me 30 seconds to load an applet now takes me at least 3 to 4 minutes.
    As it turned out..this bug was reported. It appears that the new Java applet logo (cool) was the culprit (probably because it's severals large image?). Java say they have a fix for the bug, but the fix wont be available until the 4th update release (urgh).
    I need 1.5 JRE (for work and other stuff), so i can't just simply revert back to 1.4.2
    One soultion i found is to replace the logo; however..i'm the client and does not have access to the code, so i can't do this. Anyone knows of a solution taround this until the 4th update release?
    I'm shocked to find that such a serious bug was not discovered before the relase of 1.5. I think those folks at Java is too spoiled and forget that some of us (clients) still live in the dark age of 56k modem (no satalitte, cable modem or DSL avail in my area).

    You think it is normal that it takes 30 seconds to load.
    I think it is a programming problem. You should not import a lot of package.
    Applet are supposed to be light, it is not like programs it is normal when you're on 56k (of course aol steals some of those bandwidth by sending you advertisement) and it's not my applet..it's one of a few applet s that i encountered when surfing the web..so i have ano control over how it is implemented or designed. Even small one that do simple stuff like display a hello world takes forever to load.

  • Log4j in applet

    Hello All,
    Can some please help me to remove the beaninfo lookups from my applet, when i try to configure my log4j.
    everytime i download the applet it looks on the server to find these classes, which makes it real slow.
    network: Cache entry not found [url: http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/ConsoleAppenderBeanInfo.class, version: null]
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/ConsoleAppenderBeanInfo.class with proxy=HTTP @ /127.0.0.1:8888
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/ConsoleAppenderBeanInfo.class with cookie "eSource40=5SPI|test|I025204|NA|AWM|TCH|none|test; o2HlmHqJ1STE6l5KiMNil2Nd8jMQ61B6i+Z9BrpQjn9pt1cqfi/bBD+vL0S2sbYs/JB2lRVUvhbIzuXkhd4YZMOPTT/hiC9kpIs2ejTx3vSrOTIeT6nFdo1tzWNgNko7uAIRk68l4RzkNvCg349lUAkDSit4kiqu+iGeTjsjO8AK847dNDNuKW02xbCxlwt95bztKF7/qvZvSiLPbpMoMGoAPA+m+KlovcvWB6XGdPnLzBBNdOdVOVBV/+XWrmzh5SjHcdEk2ao
    network: Cache entry not found [url: http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/ConsoleAppenderBeanInfo.class, version: null]
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/ConsoleAppenderBeanInfo.class with proxy=HTTP @ /127.0.0.1:8888
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/ConsoleAppenderBeanInfo.class with cookie "eSource40=5SPI|test|I025204|NA|AWM|TCH|none|test; SMSESSION=5USpskyWb+O8KAH0FBlzn9+7RjRbAgIG36xAE+2O/s9KB5pVABNu2V70AjZKD+nvR6RSKKxUSZj6CMr7kUrIooXfO7dpm7vA0G851Jn7bEbTD79eEGJZlYwIVPUer4U3TiSdAKpbcU0a50Du98l2Vz9D9MXDYEBHIoBDb/Jt7cmIWZRuVLDQ3G/LyR/wd0IUwB9k0/pVZFpUVYJTIssTHI/SW6JG262dEYYZXo2HlmHqJ1STE6l5KiMNil2Nd8jMQ61B6i+Z9BrpQjn9pt1cqfi
    network: Cache entry not found [url: http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/WriterAppenderBeanInfo.class, version: null]
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/WriterAppenderBeanInfo.class with proxy=HTTP @ /127.0.0.1:8888
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/WriterAppenderBeanInfo.class with cookie "eSource40=5SPI|test|I025204|NA|AWM|TCH|none|test; SMSESSION=5USpskyWb+O8KAH0FBlzn9+7RjRbAgIG36xAE+2O/s9KB5pVABNu2V70AjZKD+nvR6RSKKxUSZj6CMr7kUrIooXfO7dpm7vA0G851Jn7bEbTD79eEGJZlYwIVPUer4U3TiSdAKpbcU0a50Du98l2Vz9D9MXDYEBHIoBDb/Jt7cmIWZRuVLDQ3G/LyR/wd0IUwB9k0/pVZFpUVYJTIssTHIg7uJ4kHXtbc1zqWCOIuwdzYsTj70iWi+vwrkjPsZkxLlO20FuCcSIaA8D3pRdbnHjSBtMyTs30YLy5n0wEM=; JSESSIONID=0000KKexSGqSTsNIFZuwFDZ8m8C:-1"
    network: Cache entry not found [url: http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/WriterAppenderBeanInfo.class, version: null]
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/WriterAppenderBeanInfo.class with proxy=HTTP @ /127.0.0.1:8888
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/WriterAppenderBeanInfo.class with cookie "eSource40=5SPI|test|I025204|NA|AWM|TCH|none|test; SMSESSION=5USpskyWb+O8KAH0FBlzn9+7RjRbAgIG36xAE+2O/s9KB5pVABNu2V70AjZKD+nvR6RSKKxUSZj6CMr7kUrIooXfO7dpm7vA0G851Jn7bEbTD79eEGJZlYwIVPUer4U3TiSdAKpbcU0a50Du98l2Vz9D9MXDYEBHIoBDb/Jt7cmIWZRuVLDQ3G/LyR/wd0IUwB9k0/pVZFpUVYJTIssTHI/SzM5p+mbwJaSi9bh3mg5EYH35D3PdB+Ps+dRtXzKJ+MBYMq+2kdzSZfgCg2SWJOrUDMTXxHUoGMgA8s4zSlBqPj0zp7FQPltooE6MAD0T1NwXHr5eK+WQZ95fpX; CSSFind=pcs;
    network: Cache entry not found [url: http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/AppenderSkeletonBeanInfo.class, version: null]
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/AppenderSkeletonBeanInfo.class with proxy=HTTP @ /127.0.0.1:8888
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/AppenderSkeletonBeanInfo.class with cookie "eSource40=5SPI|test|I025204|NA|AWM|TCH|none|test; SMSESSION=5USpskyWb+O8KAH0FBlzn9+7RjRbAgIG36xAE+2O/s9KB5pVABNu2V70AjZKD+nvR6RSKKxUSZj6CMr7kUrIooXfO7dpm7vA0G851Jn7bEbTD79eEGJZlYwIVPUer4U3TiSdAKpbcU0a50Du98l2Vz9D9MXDYEBHIoBDb/Jt7cmIWZRuVLDQ3G/LyR/wd0IUwB9k0/pVZFpUVYJTIssTHI
    network: Cache entry not found [url: http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/AppenderSkeletonBeanInfo.class, version: null]
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/AppenderSkeletonBeanInfo.class with proxy=HTTP @ /127.0.0.1:8888
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/org/apache/log4j/AppenderSkeletonBeanInfo.class with cookie "eSource40=5SPI|test|I025204|NA|AWM|TCH|none|test; SMSESSION=5USpskyWb+O8KAH0FBlzn9+7RjRbAgIG36xAE+2O/s9KB5pVABNu2V70AjZKD+nvR6RSKKxUSZj6CMr7kUrIooXfO7dpm7vA0G851Jn7bEbTD79eEGJZlYwIVPUer4U3TiSdAKpbcU0a50Du98l2Vz9D9MXDYEBHIoBDbUsI4qgGuceCJYL99Gbg7uJ4kHXtbc1zqWCOIuwdzYsTj70iWi+vwrkjPsZkxLlO20FuCcSIaA8D3pRdbnHjSBtMyTs30YLy5n0wEM=; JSESSIONID=0000KKexSGqSTsNIFZuwFDZ8m8C:-1"
    network: Cache entry not found [url: http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/java/lang/ObjectBeanInfo.class, version: null]
    network: Connecting http://myserver.net/wps/PA_1_7SOO03L2106T30I8GGDBF60086/lib/java/lang/ObjectBeanInfo.class with proxy=HTTP @ /127.0.0.1:8888
    log4j: Setting property [threshold] to [INFO].Any method by which i can remove these looksups.
    I tried Introspector.setBeanInfoSearchPath(new String[0]); in the applet init method but it didnt help.
    Any other ideas how to overcome this.

    Hello,
    I fixed the unnecessary lookup problem by adding the following parameter to my applet tag.
    <PARAM name= "codebase_lookup" value= "false"/>This is based on the assumption that since i provide all the required classes on to the client side, it should not lookup on server to find any of them,
    since none of them is missing for it proper functioning.
    Works with JRE 1.6_05
    Thanks,

  • Applets and memory not being released by Java Plug-in

    Hi.
    I am experiencing a strange memory-management behavior of the Java Plug-in with Java Applets. The Java Plug-in seems not to release memory allocated for non-static member variables of the applet-derived class upon destroy() of the applet itself.
    I have built a simple "TestMemory" applet, which allocates a 55-megabytes byte array upon init(). The byte array is a non-static member of the applet-derived class. With the standard Java Plug In configuration (64 MB of max JVM heap space), this applet executes correctly the first time, but it throws an OutOfMemoryException when pressing the "Reload / Refresh" browser button or if pressing the "Back" and then the "Forward" browser buttons. In my opionion, this is not an expected behavior. When the applet is destroyed, the non-static byte array member should be automatically invalidated and recollected. Isn't it?
    Here is the complete applet code:
    // ===================================================
    import java.awt.*;
    import javax.swing.*;
    public class TestMemory extends JApplet
      private JLabel label = null;
      private byte[] testArray = null;
      // Construct the applet
      public TestMemory()
      // Initialize the applet
      public void init()
        try
          // Initialize the applet's GUI
          guiInit();
          // Instantiate a 55 MB array
          // WARNING: with the standard Java Plug-in configuration (i.e., 64 MB of
          // max JVM heap space) the following line of code runs fine the FIRST time the
          // applet is executed. Then, if I press the "Back" button on the web browser,
          // then press "Forward", an OutOfMemoryException is thrown. The same result
          // is obtained by pressing the "Reload / Refresh" browser button.
          // NOTE: the OutOfMemoryException is not thrown if I add "testArray = null;"
          // to the destroy() applet method.
          testArray = new byte[55 * 1024 * 1024];
          // Do something on the array...
          for (int i = 0; i < testArray.length; i++)
            testArray[i] = 1;
          System.out.println("Test Array Initialized!");
        catch (Exception e)
          e.printStackTrace();
      // Component initialization
      private void guiInit() throws Exception
        setSize(new Dimension(400, 300));
        getContentPane().setLayout(new BorderLayout());
        label = new JLabel("Test Memory Applet");
        getContentPane().add(label, BorderLayout.CENTER);
      // Start the applet
      public void start()
        // Do nothing
      // Stop the applet
      public void stop()
        // Do nothing
      // Destroy the applet
      public void destroy()
        // If the line below is uncommented, the OutOfMemoryException is NOT thrown
        // testArray = null;
      //Get Applet information
      public String getAppletInfo()
        return "Test Memory Applet";
    // ===================================================Everything works fine if I set the byte array to "null" upon destroy(), but does this mean that I have to manually set to null all applet's member variables upon destroy()? I believe this should not be a requirement for non-static members...
    I am able to reproduce this problem on the following PC configurations:
    * Windows XP, both JRE v1.6.0 and JRE v1.5.0_11, both with MSIE and with Firefox
    * Linux (Sun Java Desktop), JRE v1.6.0, Mozilla browser
    * Mac OS X v10.4, JRE v1.5.0_06, Safari browser
    Your comments would be really appreciated.
    Thank you in advance for your feedback.
    Regards,
    Marco.

    Hi Marco,
    my guess as to why JPI would keep references around, if it does keep them, is that it propably is an implementation side effect. A lot of things are cached in the name of performance and it is easy to leave things laying around in your cache. Maybe the page with the associated images/applets is kept in the browser cache untill the browser needs some memory and if the browser memory manager is not co-operating with the JPI/JVM memory manager the browser is not out of memory, thus not releasing its caches but the JVM may be out of memory. Thus the browser indirectly keeps the reference that it realy does not need. This reference could be inderect through some 'applet context' or what ever the browser uses to interact with JPI, don't realy know any of these details, just imaging what must/could be going on there. Browser are amazingly complicated beast.
    This behaviour that you are observing, weather the origin is something like I speculated or not, is not nice but I would not expect it to be fixed even if you filed a bug report. I guess we are left with relleasing all significatn memory structures in destroy. A simple way to code this is not to store anything in the member fields of the applet but in a separate class; then one has to do is to null that one reference from the applet to that class in the destroy method and everything will be relased when necessary. This way it is not easy to forget to release things.
    Hey, here is a simple, imaginary, way in which the browser could cause this problem:
    The browser, of course needs a reference to the applet, call it m_Applet here. Presume the following helper function:
    Applet instantiateAndInit(Class appletClass) {
    Applet applet=appletClass.newInstance();
    applet.init();
    return applet;
    When the browser sees the applet tag it instantiates and inits the new applet as follows:
    m_Applet=instantiateAndInit(appletClass);
    As you can readily see, the second time the instantiation occurs, the m_Applet holds the reference to the old applet until after the new instance is created and initlized. This would not cause a memory leak but would require that twice the memory needed by the applet would be required to prevent OutOfMemory.I guess it is not fair to call this sort of thing a bug but it is questionable design.In real life this is propably not this blatant, but could happen You could try, if you like, by allocating less than 32 Megs in your init. If you then do not run out of memory it is an indication that there are at most two instances of your applet around and thus it could well be someting like I've speculated here.
    br Kusti

  • Applet working on JBuilder but not on appletviewer!!!!!

    I ve made a keybord.Here some buttons are missing. The user presses the buttons and shapes a word!When the jButton22 is pressed(Comparison button) the applet tells him if the result is true or false and displays an image(imageIcon foruser in jlabel forusers) with the correct result!!The jlabel for users is setVisible(false) and setVisible(true) when the comparison button is pressed and the result is wrong.My problem is that the jlabel works fine in JBuilder but when i run the applet in appletviewer the jlabel forusers isnt showing!!If i minimize and maximize the window then the label appears and from that point is working properly!Any suggestions would be appreciated!Thank you!!
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import javax.swing.*;
    public class Applet5 extends Applet {
    JLabel frase = new JLabel();
    JLabel forusers = new JLabel();
    JLabel string = new JLabel();
    JLabel message = new JLabel();
    JLabel plikt = new JLabel();
    JLabel gram = new JLabel();
    JLabel sint = new JLabel();
    JLabel vrah = new JLabel();
    JLabel end = new JLabel();
    JLabel dior = new JLabel();
    JLabel befforusers = new JLabel();
    JLabel[] jLabel = new JLabel[6];
    ImageIcon myIcon1 = new ImageIcon((Applet5.class.getResource("drawing/1.jpg")));
    ImageIcon myIcon2 = new ImageIcon((Applet5.class.getResource("drawing/2.jpg")));
    ImageIcon myIcon3 = new ImageIcon((Applet5.class.getResource("drawing/3.jpg")));
    ImageIcon myIcon4 = new ImageIcon((Applet5.class.getResource("drawing/4.jpg")));
    ImageIcon myIcon5 = new ImageIcon((Applet5.class.getResource("drawing/5.jpg")));
         ImageIcon foruser1 = new ImageIcon((Applet5.class.getResource("foruser/foruser1.jpg")));
         ImageIcon foruser2 = new ImageIcon((Applet5.class.getResource("foruser/foruser2.jpg")));
         ImageIcon foruser3 = new ImageIcon((Applet5.class.getResource("foruser/foruser3.jpg")));
         ImageIcon foruser4 = new ImageIcon((Applet5.class.getResource("foruser/foruser4.jpg")));
         ImageIcon foruser5 = new ImageIcon((Applet5.class.getResource("foruser/foruser5.jpg")));
        ImageIcon frases1= new ImageIcon((Applet5.class.getResource("frase/frase1.jpg")));
        ImageIcon frases2= new ImageIcon((Applet5.class.getResource("frase/frase2.jpg")));
        ImageIcon frases3= new ImageIcon((Applet5.class.getResource("frase/frase3.jpg")));
        ImageIcon frases4= new ImageIcon((Applet5.class.getResource("frase/frase4.jpg")));
        ImageIcon frases5= new ImageIcon((Applet5.class.getResource("frase/frase5.jpg")));
    ImageIcon telos = new ImageIcon((Applet5.class.getResource("end/telos.jpg")));
    ImageIcon diorth = new ImageIcon((Applet5.class.getResource("dior/dior.jpg")));
    String[] user= new String[6];
    JButton jButton1 = new JButton("1..");
    JButton jButton2 = new JButton("2..");
    JButton jButton3 = new JButton("3..");
    JButton jButton4 = new JButton("4..");
    JButton jButton5 = new JButton("5..");
    JButton jButton21 = new JButton("��������");
    JButton jButton22 = new JButton("��������");
    JButton jButton23 = new JButton("����������");
    JButton jButton24 = new JButton("������� ������");
    JButton jButton25 = new JButton("������");
    Font f = new Font("Palatino LinoType", Font.PLAIN, 18);
    Font g = new Font("TimesRoman", Font.PLAIN, 0);
    Font c = new Font("Palatino Linotype",Font.PLAIN, 14);
    Font p = new Font("Palatino Linotype",Font.PLAIN, 14);
    String s = new String();
    int nextLabelToShowIcon = 1;
    int l=0;
    int current = 0;
    int cur = 0;
    int str = 1;
    FlowLayout flowLayout1 = new FlowLayout();
        public void init() {
          try {
                    jbInit();
                  catch(Exception e) {
                    e.printStackTrace();
         user[1]=new String("82."+"ken"+"62."+"82."+"59."+"77."+"82."+"94."+"ken"+"107"+"127"+"77."+"ken"
             +"151"+"ken"+"1.."+"69."+"107"+"53."+"93."+"59."+"82."+"94."+"ken"+"30."+"1.."+"13."+"82."+"114"
             +"82."+"94.");
          user[2]=new String("1.."+"66."+"23."+"ken"+"74."+"31."+"77."+"ken"+"82."+"ken"+"30."+"62."+"1.."
           +"59."+"82."+"94."+"ken"+"62."+"1.."+"59."+"ken"+"82."+"114"+"62."+"ken"+"1.."+"77."+"ken"+"107"+"59."+"94."
           +"ken"+"1.."+"93."+"77."+"53."+"99."+"82.");
          user[3]=new String("59."+"77."+"2.."+"ken"+"107"+"59."+"ken"+"30."+"ken"+"31."+"74."+"31."+"ken"+"29."
           +"46."+"82."+"107"+"2.."+"ken"+"107"+"82."+"ken"+"82."+"77."+"82."+"74."+"1.."+"ken"+"94."+"82."+"114"
           +"ken"+"13."+"65."+"1.."+"94."+"123"+"53."+"74."+"38."+"107"+"1.."+"59.");
          user[4]=new String("74."+"35."+"1.."+"65."+"127"+"94."+"ken"+"82."+"ken"+"159"+"ken"+"109"+"120"
           +"ken"+"82."+"59."+"62."+"38."+"82."+"120"+"ken"+"107"+"59."+"74."+"2.."+"ken"+"56."+"31."+"93."+"1.."
           +"85."+"82."+"77."+"107"+"2.."+"94.");
    jLabel[1] = new JLabel();
    jLabel[2] = new JLabel();
    jLabel[3] = new JLabel();
    jLabel[4] = new JLabel();
    jLabel[5] = new JLabel();
    jButton1.setPreferredSize(new Dimension(32, 30));
    jButton1.setIcon(myIcon1);
    jButton1.setFont(g);
    jButton1.setVerticalTextPosition(SwingConstants.CENTER);
    jButton1.setHorizontalTextPosition(SwingConstants.CENTER);
    jButton1.addActionListener(new Applet5_jButton1_actionAdapter(this));
    jButton2.setPreferredSize(new Dimension(32, 30));
    jButton2.setIcon(myIcon2);
    jButton2.setFont(g);
    jButton2.setVerticalTextPosition(SwingConstants.CENTER);
    jButton2.setHorizontalTextPosition(SwingConstants.CENTER);
    jButton2.addActionListener(new Applet5_jButton2_actionAdapter(this));
    jButton3.setPreferredSize(new Dimension(32, 30));
    jButton3.setIcon(myIcon3);
    jButton3.setFont(g);
    jButton3.setVerticalTextPosition(SwingConstants.CENTER);
    jButton3.setHorizontalTextPosition(SwingConstants.CENTER);
    jButton3.addActionListener(new Applet5_jButton3_actionAdapter(this));
    jButton4.setPreferredSize(new Dimension(36, 30));
    jButton4.setIcon(myIcon4);
    jButton4.setFont(g);
    jButton4.setVerticalTextPosition(SwingConstants.CENTER);
    jButton4.setHorizontalTextPosition(SwingConstants.CENTER);
    jButton4.addActionListener(new Applet5_jButton4_actionAdapter(this));
    jButton5.setPreferredSize(new Dimension(37, 30));
    jButton5.setIcon(myIcon5);
    jButton5.setVerticalTextPosition(SwingConstants.CENTER);
    jButton5.setHorizontalTextPosition(SwingConstants.CENTER);
    jButton5.setFont(g);
    jButton5.addActionListener(new Applet5_jButton5_actionAdapter(this));
    jButton21.addActionListener(new Applet5_jButton21_actionAdapter(this));
    jButton22.addActionListener(new Applet5_jButton22_actionAdapter(this));
    jButton23.addActionListener(new Applet5_jButton23_actionAdapter(this));
    jButton24.addActionListener(new Applet5_jButton24_actionAdapter(this));
    jButton25.addActionListener(new Applet5_jButton25_actionAdapter(this));
    frase.setIcon(frases1);
    frase.setPreferredSize(new Dimension(750,40));
    message.setPreferredSize(new Dimension(220, 30));
    befforusers.setPreferredSize(new Dimension(1000,50));
    forusers.setIcon(foruser1);
    forusers.setPreferredSize(new Dimension(1000,50));
    forusers.setVisible(false);
    end.setPreferredSize(new Dimension(210,30));
    end.setVisible(false);
    dior.setIcon(diorth);
    dior.setPreferredSize(new Dimension(81,30));
    dior.setVisible(false);
    plikt.setText("������������");
    gram.setText("�������� & ���������� ���������");
    sint.setText("����������");
    vrah.setText("������������");
    message.setFont(p);
    plikt.setFont(f);
    gram.setFont(c);
    sint.setFont(c);
    vrah.setFont(c);
    string.setVisible(false);
    this.setLayout(flowLayout1);
    jLabel[1].setPreferredSize(new Dimension(50, 50));
    jLabel[2].setPreferredSize(new Dimension(50, 50));
    jLabel[3].setPreferredSize(new Dimension(50, 50));
    jLabel[4].setPreferredSize(new Dimension(50, 50));
    jLabel[5].setPreferredSize(new Dimension(50, 50));
    this.add(plikt);
    this.add(gram);
    this.add(jButton1);
    this.add(jButton2);
    this.add(jButton3);
    this.add(jButton4);
    this.add(jButton5);
    this.add(dior);
    this.add(jButton21);
    this.add(jButton22);
    this.add(jButton23);
    this.add(jButton24);
    this.add(jButton25);
    this.add(end);
    this.add(frase);
    this.add(message);
    this.add(befforusers);
    this.add(forusers);
    this.add(jLabel[1]);
    this.add(jLabel[2]);
    this.add(jLabel[3]);
    this.add(jLabel[4]);
    this.add(jLabel[5]);
    this.add(string);
    private void next2(){
    if(str==0);
    string.setText(user[1]);
    if(str==1)
       string.setText(user[2]);
    if(str==2)
       string.setText(user[3]);
    if(str==3);
    string.setText(user[4]);
    if(str==4)
       string.setText(user[5]);
    str++;
      private void next1(){
        if(cur==0)
      forusers.setIcon(foruser2);
      else if(cur==1)
      forusers.setIcon(foruser3);
      else if(cur==2)
      forusers.setIcon(foruser4);
      else if(cur==3)
      forusers.setIcon(foruser5);
      else if(cur==4)
      forusers.setIcon(foruser6);
        cur++;
      private void next(){
        if(current==0)
    frase.setIcon(frases2);
    else if(current==1)
    frase.setIcon(frases3);
    else if(current==2)
    frase.setIcon(frases4);
    else if(current==3)
    frase.setIcon(frases5);
    current++;
    void jButton1_actionPerformed(ActionEvent e)  {
    if (nextLabelToShowIcon == 1)
    jLabel[1].setIcon(myIcon1);
    else if (nextLabelToShowIcon == 2)
    jLabel[2].setIcon(myIcon1);
    else if (nextLabelToShowIcon == 3)
    jLabel[3].setIcon(myIcon1);
    else if (nextLabelToShowIcon == 4)
    jLabel[4].setIcon(myIcon1);
    else if (nextLabelToShowIcon == 5)
    jLabel[5].setIcon(myIcon1);
    s = s + jButton1.getText();
    nextLabelToShowIcon++;l++; jButton21.setVisible(true); dior.setVisible(false);
    void jButton2_actionPerformed(ActionEvent e)  {
    if (nextLabelToShowIcon == 1)
    jLabel[1].setIcon(myIcon2);
    else if (nextLabelToShowIcon == 2)
    jLabel[2].setIcon(myIcon2);
    else if (nextLabelToShowIcon == 3)
    jLabel[3].setIcon(myIcon2);
    else if (nextLabelToShowIcon == 4)
    jLabel[4].setIcon(myIcon2);
    else if (nextLabelToShowIcon == 5)
    jLabel[5].setIcon(myIcon2);
    s = s + jButton2.getText();
    nextLabelToShowIcon++;l++; jButton21.setVisible(true); dior.setVisible(false);}
    void jButton3_actionPerformed(ActionEvent e)  {
    if (nextLabelToShowIcon == 1)
    jLabel[1].setIcon(myIcon3);
    else if (nextLabelToShowIcon == 2)
    jLabel[2].setIcon(myIcon3);
    else if (nextLabelToShowIcon == 3)
    jLabel[3].setIcon(myIcon3);
    else if (nextLabelToShowIcon == 4)
    jLabel[4].setIcon(myIcon3);
    else if (nextLabelToShowIcon == 5)
    jLabel[5].setIcon(myIcon3);
    s = s + jButton3.getText();
    nextLabelToShowIcon++;l++; jButton21.setVisible(true); dior.setVisible(false);}
    void jButton4_actionPerformed(ActionEvent e)  {
    if (nextLabelToShowIcon == 1)
    jLabel[1].setIcon(myIcon4);
    else if (nextLabelToShowIcon == 2)
    jLabel[2].setIcon(myIcon4);
    else if (nextLabelToShowIcon == 3)
    jLabel[3].setIcon(myIcon4);
    else if (nextLabelToShowIcon == 4)
    jLabel[4].setIcon(myIcon4);
    else if (nextLabelToShowIcon == 5)
    jLabel[5].setIcon(myIcon4);
    s = s + jButton4.getText();
    nextLabelToShowIcon++;l++; jButton21.setVisible(true); dior.setVisible(false);}
    void jButton5_actionPerformed(ActionEvent e)  {
    if (nextLabelToShowIcon == 1)
    jLabel[1].setIcon(myIcon5);
    else if (nextLabelToShowIcon == 2)
    jLabel[2].setIcon(myIcon5);
    else if (nextLabelToShowIcon == 3)
    jLabel[3].setIcon(myIcon5);
    else if (nextLabelToShowIcon == 4)
    jLabel[4].setIcon(myIcon5);
    else if (nextLabelToShowIcon == 5)
    jLabel[5].setIcon(myIcon5);
    s = s + jButton5.getText();
    nextLabelToShowIcon++;l++; jButton21.setVisible(true); dior.setVisible(false);}
    void jButton21_actionPerformed(ActionEvent e) {
    if(nextLabelToShowIcon>1){
    jLabel[l].setIcon(null);
    s = s.substring(0, s.length()-3);
    l = l - 1;
    nextLabelToShowIcon = nextLabelToShowIcon - 1;}
    else{
    jButton21.setVisible(false);
    dior.setVisible(true);
    l=0;
    s="";
    nextLabelToShowIcon=1;}
    void jButton22_actionPerformed(ActionEvent e) {
    if(s.length()>0){
        if (s.equals(user[str])) {
          message.setText("������ ����� �����");
        else {
          forusers.getIcon();
          forusers.setVisible(true);
          befforusers.setVisible(false);
          message.setText("�����. � ����� ������� ����� : ");
    repaint();
    jButton1.setDisabledIcon(myIcon1);
    jButton2.setDisabledIcon(myIcon2);
    jButton3.setDisabledIcon(myIcon3);
    jButton4.setDisabledIcon(myIcon4);
    jButton5.setDisabledIcon(myIcon5);
    jButton1.setEnabled(false);
    jButton2.setEnabled(false);
    jButton3.setEnabled(false);
    jButton4.setEnabled(false);
    jButton5.setEnabled(false);
    jButton21.setEnabled(false);
    void jButton23_actionPerformed(ActionEvent e) {
    dior.setVisible(false);
    jButton21.setEnabled(true);
    jButton21.setVisible(true);
    s="";
    l=0;
    nextLabelToShowIcon=1;
    message.setText("");
    befforusers.setVisible(true);
    forusers.setVisible(false);
    jLabel[1].setIcon(null);
    jLabel[2].setIcon(null);
    jLabel[3].setIcon(null);
    jLabel[4].setIcon(null);
    jLabel[5].setIcon(null);
      jButton1.setEnabled(true);
      jButton2.setEnabled(true);
      jButton3.setEnabled(true);
      jButton4.setEnabled(true);
      jButton5.setEnabled(true);
    void jButton24_actionPerformed(ActionEvent e) {
    jButton21.setVisible(true);
    jButton21.setEnabled(true);
    dior.setVisible(false);
    nextLabelToShowIcon=1;
      jButton1.setEnabled(true);
      jButton2.setEnabled(true);
      jButton3.setEnabled(true);
      jButton4.setEnabled(true);
      jButton5.setEnabled(true);
      jButton6.setEnabled(true);
    l=0;
    befforusers.setVisible(true);
    forusers.setVisible(false);
    next1();
    next();
    next2();
    s="";
    message.setText("");
    jLabel[1].setIcon(null);
    jLabel[2].setIcon(null);
    jLabel[3].setIcon(null);
    jLabel[4].setIcon(null);
    jLabel[5].setIcon(null);
    void jButton25_actionPerformed(ActionEvent e) {
    public void paint(Graphics g) {
    super.paint(g);}
    private boolean isStandalone = false;
    public String getParameter(String key, String def) {
      return isStandalone ? System.getProperty(key, def) :
      (getParameter(key) != null ? getParameter(key) : def);
    private void jbInit() throws Exception {
        public String getAppletInfo() {
          return "Applet Information";
      public String[][] getParameterInfo() {
        return null;
      public static void main(String[] args) {
        Applet5 applet = new Applet5();
        applet.isStandalone = true;
        Frame frame = new Frame();
        frame.add(applet, BorderLayout.CENTER);
        applet.init();
        applet.start();
        frame.setSize(450,400);
        Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
        frame.setLocation((d.width - frame.getSize().width) / 2, (d.height - frame.getSize().height) / 2);
        frame.setVisible(true);
        frame.setResizable(false);
    class Applet5_jButton1_actionAdapter
    implements java.awt.event.ActionListener {
    Applet5 adaptee;
    Applet5_jButton1_actionAdapter(Applet5 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton1_actionPerformed(e);
    class Applet5_jButton2_actionAdapter
    implements java.awt.event.ActionListener {
    Applet5 adaptee;
    Applet5_jButton2_actionAdapter(Applet5 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton2_actionPerformed(e);
    class Applet5_jButton3_actionAdapter
    implements java.awt.event.ActionListener {
    Applet5 adaptee;
    Applet5_jButton3_actionAdapter(Applet5 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton3_actionPerformed(e);
    class Applet5_jButton4_actionAdapter
    implements java.awt.event.ActionListener {
    Applet5 adaptee;
    Applet5_jButton4_actionAdapter(Applet5 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton4_actionPerformed(e);
    class Applet5_jButton5_actionAdapter
    implements java.awt.event.ActionListener {
    Applet5 adaptee;
    Applet5_jButton5_actionAdapter(Applet5 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton5_actionPerformed(e);
    class Applet5_jButton21_actionAdapter
    implements java.awt.event.ActionListener {
    Applet5 adaptee;
    Applet5_jButton21_actionAdapter(Applet5 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton21_actionPerformed(e);
    class Applet5_jButton22_actionAdapter
    implements java.awt.event.ActionListener {
    Applet5 adaptee;
    Applet5_jButton22_actionAdapter(Applet5 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton22_actionPerformed(e);
    class Applet5_jButton23_actionAdapter
    implements java.awt.event.ActionListener {
    Applet5 adaptee;
    Applet5_jButton23_actionAdapter(Applet5 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton23_actionPerformed(e);
    class Applet5_jButton24_actionAdapter
    implements java.awt.event.ActionListener {
    Applet5 adaptee;
    Applet5_jButton24_actionAdapter(Applet5 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton24_actionPerformed(e);
    class Applet5_jButton25_actionAdapter
    implements java.awt.event.ActionListener {
    Applet5 adaptee;
    Applet5_jButton25_actionAdapter(Applet5 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton25_actionPerformed(e);
    }

    I performed some testing on your program, and get an ArrayIndexOutOfBoundsException on one of the buttons. So, I guess there have to be some implementation logic error.
    Since I have no idea what your program is trying to achieve, here's what you can do:
    1. Try to shorten your program.
    2. Add your code piece by piece.
    3. Perform some logic testing.
    4. Repeat steps 2 & 3.

  • Simple button applet help

    ok, i'm working on a project involving buttons, and i finished it and it compiles fine, but when i run the applet (using textpad), nothign shows up.
    i decided to make a new applet of only the frame and buttons, and i got the same problem. here is the simple one.
    import java.util.*;
    import java.applet.Applet;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    public class framek extends JApplet
         public static final int WIDTH = 600;
         public static final int HEIGHT = 300;
         public void framek()
              JFrame myWindow = new JFrame();
              myWindow.setSize(WIDTH, HEIGHT);
         Container contentPane = myWindow.getContentPane();
              contentPane.setBackground(Color.blue);
              contentPane.setLayout(new BorderLayout());
              JPanel button = new JPanel();
              button.setLayout(new FlowLayout());
              JButton convert = new JButton("Translate");
              button.add(convert);
              JButton delete = new JButton("Delete");
              button.add(delete);
              contentPane.add(button, BorderLayout.SOUTH);
    i might have made some mistakes in the shortening of my project (such as variables that arent used) but i just need help with getting the buttons and background things to show. I used very similar programs in a textbook and on the web to check and they worked fine on textpad, and this doesnt. its probably a very simple thing that i forgot but i cant find it yet, as i am fairly new to swing.
    any help is appreciated thanks

    /*  <applet code="HelloApplet" width="600" height="300"></applet>
    *  use: >appletviewer HelloApplet.java
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class HelloApplet extends JApplet
        public static final int WIDTH = 600;
        public static final int HEIGHT = 300;
        public void init()
            Container contentPane = getContentPane();
            contentPane.setBackground(Color.blue);
            contentPane.setLayout(new BorderLayout());
            JPanel button = new JPanel();
            button.setLayout(new FlowLayout());
            JButton convert = new JButton("Translate");
            button.add(convert);
            JButton delete = new JButton("Delete");
            button.add(delete);
            contentPane.add(button, BorderLayout.SOUTH);
        /** this is a convenience method */
        public static void main(String[] args)
            JApplet applet = new HelloApplet();
            JFrame myWindow = new JFrame();
            myWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            myWindow.add(applet);
            myWindow.setSize(WIDTH, HEIGHT);
            myWindow.setLocation(200,200);
            applet.init();
            myWindow.setVisible(true);
    }

Maybe you are looking for