Applet getting closed autometically

Hi,
We are using fireFox 3.6.12.
We are running a program which loads an Applet in an IFrame of a JSP.
This works fine when a FireFox mozilla opens for the first time.
If we refresh the page, and try the same action, the applet gets loaded but after 5 seconds it gets closed automatically.
This is happening always...
This works fine on FireFox 4 beta.
have java 1.6.22
Please help. this is a blocking issue.
mail me if you can with your updates... [email protected]
Nikhil

A combination of the suggested solutions gives the Applet focus about 50% of the time. I guess this is the best result I can get, and I'm satisfied with it. Thanks!
In start()
setVisible(true);
requestFocus();
requestFocusInWindow();
requestFocus();
In paint()
if (mFirstPaint)
mFirstPaint = false;
setVisible(true);
requestFocus();
requestFocusInWindow();
requestFocus();
}

Similar Messages

  • Browser gets closed abruptly producing 'Program Error' on launched browser

    Hi all,
    I have a applet program (code copied below). The applet just launches a test frame. The applet is launched by clicking on a 'launch' button in a browser(either Netscape or Mozilla).
    When user closes the frame by clicking on frame close icon, the applet's stop() is invoked. In applet's stop, there are some system resource cleaning code and code for closing the applet window.
    But when user closes the frame, and before applet window gets closed, if user again clicks on 'launch' button in the parent browser, the whole browser gets closed abruptly producing a Program Error saying 'Netscp.exe has generated errors and will be closed by windows. You will need to restart the program' in case of netscape browser. The same happens for mozilla browser too.
    what is the problem here?
    how to fix it...
    please help...
    -thx,
    Soni.
    (To execute this plugin.jar of jdk is required)
    import javax.swing.JApplet;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import netscape.javascript.JSObject;
    public class SampleApplet extends JApplet implements ActionListener{
         protected JButton closeButton = null;
         protected JSObject win = null;
         private JFrame frame = null;
         public void init(){
              this.win = JSObject.getWindow(this);
              this.closeButton = new JButton("Close Browser Window");
              //this.add(this.closeButton);
              //this.closeButton.addActionListener(this);
              frame = new JFrame("Test Frame");
              frame.setSize(300, 400);
              frame.addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
    System.out.println("windowClosing");
                        SampleApplet.this.stop();
              frame.show();
         } // ends init(void)
         public void actionPerformed(ActionEvent ae){
              //this.win.eval("self.close();");
              //closeLaunchedBrowser();
              stop();
         private boolean alreadyClosed = false;
         public void stop() {
              if (!alreadyClosed) {
                   alreadyClosed = true;
                   closeLaunchedBrowser();
                   frame.dispose();
                   System.gc();
                   System.runFinalization();
         private void closeLaunchedBrowser() {
              final SampleApplet thisObject = this;
              Runnable r = new Runnable() {
                   public void run() {
                        try {
                             JSObject win = (JSObject)JSObject.getWindow(thisObject);
                             if (win != null && win.toString() != null) {
                                  //win.eval("top.opener=self;self.close();");
                                  //win.call("close", null);
                                  win.eval("self.close();");
                        } catch (Exception e) {
              Thread t = new Thread(r);
              t.start();
    } // ends class CloseApplet
    //////////////////////////////////////////////////////

    not at all since it only causes problems.
    It works relativly stable on IE (since its an very old browser not updated since a long time -> SUN was able to work arround all the open IE bugs) but all other browsers cause troubles, call it opera, safari, konqueror or all the others.
    The problem is that the plugin-interface requires a lot of interaction between the jvm and the browser and since browsers change very often it seems almost impossible to guarantee compatibility.
    Sometimes it works, sometimes not, sometimes its just broken in one version and works in an older one.
    I would suggest to stay away from java->javascript or the other was round...
    lg Clemens

  • Please tell me a BAPI to get Closing balance of customer account based on Sales Organization?

    Hi Experts,
    A requirement has come up where I want to get Customer closing balance based on its sales organization as this particular customer is extented to 2 different sales organizations. I want to get the closing balance of individual sales organization vise.
    Please tell me a BAPI to get Closing balance of customer account based on Sales Organization?

    AFAIK there is no such BAPI, cause there is no database table with balance for customer per sales organisation. (No KNCx table for VKORG)
    First ask functionals (*) how to recover sales organisation from a FI document (I suppose for SD invoice it is easy if no merging between organisation) will be a little tricker for pure FI document like payment transactions (hope thet are quickly cleared...)  Then start from non cleared records of BSID (also BSAD if you use a past date of reference, in case you have to add the records of BSAD with clearing date greater than reference date) and cross it with SD information to break FI into sales organisation.
    Regards,
    Raymond
    (*) Ask for where do they store VKORG in FI documents

  • Import of photos is not working. Moreover 'photos' app is not getting closed, it says 'closing all libraries'. Even it is stopping shutdown/restart of my mac.

    Import of photos is not working. Moreover 'photos' app is not getting closed, it says 'closing all libraries'. Even it is stopping shutdown/restart of my mac.

    Next time you open the photos application hold down both of the keys suggested and then launch the application in the usual way. If you do this you will be presented with the opportunity to repair your library.

  • DriverManagerXAConnection is not getting closed.Toplink 9.0.4.5 OC4J 10.1.2

    DriverManagerXAConnection is not getting closed.
    Toplink is acquiring connections from two pools OracleConnectionPooledDataSource
    and XAConnectionpool. The connection of PooledDatasource is getting released
    but the DriverManagerXAConnection is not getting released.
    The oc4j output shows.
    [java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@d042d7 to pool (Pool size: 1)
    [java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@702936 to pool (Pool size: 2)
    [java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@1c0db6a to pool (Pool size: 3)
    I saw a thread in oc4j forum
    Get and close connections many times in an EJB transaction drains pool
    which says that this issue is resolved, but I am using toplink 9045 and oc4j 1012
    and the problem still persist, also I cannot find the bug 3330123 which is
    mentioned in that link on metalink.
    Does toplink uses two different connection pools for reading and writing respectively
    when used with External Transaction Controller ?
    If yes then how this two different pools be configured.
    Any help is appreciated.

    Hello,
    In the forum posting you mentioned, bug: 3330123 I think was a red herring as it was an internal bug that was never able to be verified.
    The post though mentions that a Tar:3793784.996 was opened. This tar was linked to bug:3674906 which was created to deal with the issue that calling ds.getConnection() max-connections*10 times, OC4J throws SQLException (timeout).
    The problem was that each getConnection call was returning a new logical connection, even though they would share the same physical connection if in the same transaction context. This was changed so that there is no limit on the number of logical connections.
    The release logging messages you are seeing are a left over that doesn't seem to have been looked at as a probelm in the bug. I believe they can be ignored - the logical connections are held on to by the container transaction and will only released when this transaction is commited/rolledback.
    As for pooling configuration, I suggest looking at the sessionbean demos that use OC4J as examples of how it should be configured. TopLink will use separate pools for reading/writing if configured.
    Best Regards,
    Chris Delahunt

  • Supplier is getting Closed notifications for message name EMAIL_PO_PDF

    Hi,
    Supplier is getting Closed FYI notifications for message name EMAIL_PO_PDF. Below is an example.
    Please suggest why they are generated and how to stop these notifications as supplier does not want to receive them.
    From: Production Workflow Mailer (D1556P) [mailto:[email protected]]
    Sent: Thursday, July 12, 2012 3:45 PM
    To: [email protected]
    Subject: Closed: KPN - Standard Purchase Order 3039086, 0
    You earlier received the notification shown below. That notification is now closed, and no longer requires your response. You may simply delete it along with this message.
    From               ROOS, C
    To               [email protected]
    Sent               18-JUN-12 22:10:57
    ID               865518
    Please review the purchase order and any other document attached to this message.
    Regards,
    Natasha

    Hi,
    Thanks for the response!
    The Autoclose_FYI parameter is set to Y already.
    Which parameter decides the end date for this type of notifications ? As we see end date is sometimes only 1 min and for others it is 20-30 days.
    Earlier the supplier was receiving only FYI notifications like KPN - Standard Purchase Order 3039086, 0+. Now, he is receiving Closed notifications like Closed*: KPN - Standard Purchase Order 3039086, 0_. How come the supplier is suddenly receiving FYI notifications with prefix CLOSED ?
    Regards,
    Natasha

  • TCP Socket connection in CLOSE_WAIT status and not getting closed

    I am facing an issue with the TCP socket connections not getting closed and they are in CLOSE_WAIT status for ever.
    As a part of batch process in our application, emails are sent with 4 embedded images. These images are downloaded from 3rd party site with IP say "UUU.XXX.YYY.ZZZ"
    The images are embedded to email as follows
    1. An URL object is created with the site url.
    URL urlPhoto = new
    URL("http://UUU.XXX.YYY.ZZZ/email/photos.jpg");
    2.     The image cid is created with the URL object and the image name
    HtmlEmail htmlEmail = new HtmlEmail();
    String cid1 = htmlEmail.embed(urlPhoto,
    "photo.jpg");
    3.     The image cid is added to the email template by replacing the ${cid1} and the email is sent.
    <td valign="top">
                   <img src="cid:${cid1}" width="279" height="274">
              </td>
    When a mail is sent, 4 new TCP connections are opened and are put in CLOSE_WAIT status for ever. For every mail sent 4 new connections are opened. In UNIX there is an upper limit on the number of open file handles (defaults to 1024) at any point of time. The open TCP connection has the underlying socket in CLOSE_WAIT status and is not getting closed at all. When the upper limit (1024) is reached the batch process is throwing the following exception and terminates.
    Caused by: com.inet.tds.ap: java.net.SocketExceptionjava.net.SocketException: Too many open files
    at com.inet.tds.am.a(Unknown Source)
    at com.inet.tds.TdsDriver.a(Unknown Source)
    at com.inet.tds.TdsDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at com.hcomemea.batchprocess.dataaccess.database.BaseJdbcDao.openConnection(BaseJdbcDao.java:106)
    ... 12 more
    When I run the command lsof in UNIX which list the open file handles in the system
    $ /usr/sbin/lsof -p 22933 -i | grep CLOSE_WAIT
    java 22933 build_master 297u IPv6 129841943 TCP integration.com:47929->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    java 22933 build_master 298u IPv6 129841947 TCP integration.com:47933->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    java 22933 build_master 299u IPv6 129841950 TCP integration.com:47936->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    java 22933 build_master 300u IPv6 129841970 TCP integration.com:47952->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    ���list of 935 connections similarly�
    I tried 2 solutions
    1. Got the HttpURLConnection from the URL object and invoked disconnect method on the same. But it doesn�t work.
    2. Ran the batch process java program with the parameter �Dhttp.keepAlive=false to close the underlying connection but didn�t help.
    I need the underlying sockets to be closed and not put in CLOSE_WAIT status after sending the mail.
    Is it the problem with the embed method of HtmlEmail object not closing the underlying socket connection.
    If anyone has faced this issue before, kindly let me know the possible solutions for the same ASAP.
    Thank you,
    Ramesh G

    This sounds more like a problem due to connection pooling at middle tier/application server.
    If that has been ruled out, then you might to enable DCD or set expiry time on the server.

  • Custom screen window not getting closed !

    I have designed a screen and calling that using call screen XXXX starting at 15 5. Sreen does load up. Upon clicking close button(X mark) on the top right side, window is not getting closed.
    I have two more buttons OK and CANCEL in screen, which I designed, on clicking them screen does behave properly,
    I searched in SDN but couldnt get much help.
    Any idea what am missing ??
    Thanks & Regards
    Himayat.

    Hi Gautham,
    I already have this code in place,
    CLEAR v_ok_code.
      v_ok_code = sy-ucomm.
      CASE v_ok_code.
        WHEN 'CNCL'.
          REFRESH it_input.
          LEAVE TO SCREEN 0.
          WHEN 'TSAVE'.
          PERFORM update_table.
        WHEN OTHERS.
      ENDCASE.
    The thing is that generally for closing(X mark button on top), we dont do any explicit coding. I see some strange behaviour.

  • Import manager getting closed while importing

    when i am trying to import the excel sheet thru import manager,the import manager is getting closed in the step while it is getting "prepared for importing the records."
    Can someone tell me why it is so.

    Hi Shifali
    some check points to be followed:
    1. After connecting to the excel file see in the source preview for blank rows and columns. If existing delete all such empty rows and connect to the file again.
    2. If data is in multiple sheets are you using for field for joining the sheets? please ensure that there is atleast 1 field used for joining the sheets.
    3. How big is the excel file? Try to import the records in chunks that is split the excel file to contain only say 10k records and connect to smaller files and see if import manager is working fine.
    best regards
    Ravi

  • Excel in my mac it gets closed," excel unexpectedly closed "

    Hi
    I am working on Excell for MAc in Mac book PRO and sicne almost a month i am facing this problem. Excel while working gets closed unexpectedly and asks if you want o send error message to apple. I click YES. thsi happens almost every day once. But today its heights its happened 3 times and all my days work gone....!!!!  even though cuold recover part of it.  Pl advice what can be the issue ? is there any BUG or do i need to udpate some thing !!!!!!!

    You may want to try taking your query to the MS Office 2011 Excel forum -> http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macexcel?sort=lastrep lydate&dir=desc&tab=Threads&status=&mod=&modAge=&advFil=&postedAfter=&postedBefo re=&threadType=All&tm=1387867799291, uninstalling (http://support.microsoft.com/kb/2398768?wa=wsignin1.0) Office and reinstalling or trying both the forum and the uninstall/reinstall.
    But I would try the forum first.
    Clinton

  • How to get closing balance in MM

    hi
    Please help me to get closing balance for every line in ABAP program. for example
    doc   dt     Mvt  receipts  issues     cl. bal
                                                                                    op. bal    100
    1 -  1.1.06 -  101 - 100   -    00    -     200
    2 -  2.1.06 -  601 - 000   -    50    -     150
    3 -  3.1.06 -  601 - 000   -    25    -     125
    here my problem is i am not able to get LOGIC for  closing balance in every line.i.e closing balance = ((op.bal + receipts) - Issues))
    i am very much appriciable if any body can give the solution immediately.
    with best regards,
    Message was edited by: Abdul  Jabbar

    Thanx

  • Services are getting closed.

    Hi all,
    I do have SUN 420R with Solaris 9 with Oracle database and webbase application running.
    The services are to be started and stopped by the appliation shelll scripts.
    And when i tried to start them they are working fine. but they all runnig untill i close the window in
    which i have started. Soon after closing the window the services are getting closed .
    I tried several time but i could not .
    Somebody advised me to type "exit" and then close the window .
    but no use, still the problem stays like that only.
    CAN ANYBODY HELP ME IN this matter.............................??????????????????????
    Thanks in advance.

    nohup the shell script that you use to start the processes.
    man nohup
    will show you what you can do.

  • Sales order not getting closed

    Hi,
    I am creating delivery document through SDK based on existing sales orders. it creates it with perfect quantity, tax , amount and doctotal values but the original sales order does not get closed contradictory to SAP's standard flow.it does shwo all the row-status as closed. but the document status remains open.
    what could be wrong? do i have to close it through SDK?
    Thanks,
    Binita

    Binta,
    As Petr said, i have added a SO in normal SAP UI without any addon, and copied it to Delivery and changed the Freight and added the delivery, in this case, the SO remains open.
    So I guess u can summarize that if any changes occur the SO would remain open?
    Hope it helps,
    Vasu Natari.

  • MIclient gets closed ,generates the HTTPError.txt file when save ispressed

    We have created an application which displays data in a table .When the application is launched through mobile client and the save button is pressed after making any change in the existing data than the client gets closed and an HTTPError.txt file gets generated which displays the following trace.
    <?xml version="1.0" encoding="UTF-8"?><!-- Server Error Page --><XBCML version="2" supportBits="42" xmlns:SAP="SAP"><Localization dateFormat="MM/dd/yyyy" decimalSeparator="." groupingSeparator="," locale="en_US"/><Client name="" version="" supportBits="6A"/><Server supportBits="537205" workProtectMode="%WORKPROTECTIONMODE%"><Exception text="An error has occurred: Failed to process the request. [] " callStack="java.lang.IllegalArgumentException: No InternalState found for id &quot;110&quot;. List of available states { [0]-CONSISTENT (0); [101]-NEW (101); [102]-MOIFIED_LOCAL (102); [103]-MOIFIED_GLOBAL (103); [104]-REMOVED_LOCAL (104); [105]-REMOVED_GLOBAL (105); [201]-INSERTED (201); [202]-UPDATED (202); [203]-DELETED_LOCAL (203); [204]-VALUE_DELETED_GLOBAL (204); [299]-HARD_DELETED (299); [301]-REJECTED_INSERT (301); [302]-REJECTED_UPDATE (302); [303]-REJECTED_DELETE (303); }
         at com.sap.tc.mobile.cfs.mbosync.InternalSyncState.getByShortValue(InternalSyncState.java:1169)
         at com.sap.tc.mobile.cfs.mbosync.MBOChangeListener.transistNodeWithClientModify(MBOChangeListener.java:205)
         at com.sap.tc.mobile.cfs.mbosync.MBOChangeListener.beforeUpdate(MBOChangeListener.java:651)
         at com.sap.tc.mobile.cfs.pers.cache.DefaultPersistenceManager.validateUpdate(DefaultPersistenceManager.java:1523)
         at com.sap.tc.mobile.cfs.pers.impl.spi.cache.AbstractPersistable.mdDoModify(AbstractPersistable.java:197)
         at com.sap.models.SORDER_HEADER.setVKORG(SORDER_HEADER.java:346)
         at com.sap.app.customercomp.wdp.IPublicCustomerComp$IQueryResultElement.wdSetObject(IPublicCustomerComp.java:2021)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeElement.wdSetObject(MappedNodeElement.java:74)
         at com.sap.tc.webdynpro.progmodel.context.NodeElement.wdSetObject(NodeElement.java:649)
         at com.sap.tc.webdynpro.progmodel.context.AttributePointer.setObject(AttributePointer.java:421)
         at com.sap.tc.webdynpro.clientserver.data.PendingUserInput.transportPendingUserInput(PendingUserInput.java:676)
         at com.sap.tc.webdynpro.clientserver.data.PendingUserInput.transport(PendingUserInput.java:364)
         at com.sap.tc.webdynpro.clientserver.data.DataContainer.transportPendingUserInput(DataContainer.java:318)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.transport(ClientComponent.java:579)
         at com.sap.tc.webdynpro.clientserver.phases.TransportIntoContextPhase.execute(TransportIntoContextPhase.java:54)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequestPartly(WindowPhaseModel.java:161)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doProcessRequest(WindowPhaseModel.java:109)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:96)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:469)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:52)
         at com.sap.tc.webdynpro.clientimpl.scxml.client.SmartClient.executeTasks(SmartClient.java:612)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doExecute(ClientApplication.java:1431)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doProcessing(ClientApplication.java:1251)
         at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToApplicationDoProcessing(AbstractExecutionContextDispatcher.java:158)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.sessionctx.ExecutionContextDispatcher.dispatchToApplicationDoProcessing(ExecutionContextDispatcher.java:88)
         at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:81)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:507)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:527)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessingStandalone(ApplicationSession.java:458)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:249)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:699)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:231)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:231)
         at com.sap.tc.mobile.mwd.runtime.fwk.dispatcher.http.WebDynproRequestHandler.handleRequest0(WebDynproRequestHandler.java:157)
         at com.sap.tc.mobile.mwd.runtime.fwk.dispatcher.http.WebDynproRequestHandler.handleRequest(WebDynproRequestHandler.java:110)
         at com.sap.tc.mobile.mwd.runtime.fwk.dispatcher.http.AbstractRequestHandler.handleRequest(AbstractRequestHandler.java:306)
         at com.sap.tc.mobile.mwd.runtime.fwk.dispatcher.http.SimpleHttpServer.handleRequest0(SimpleHttpServer.java:247)
         at com.sap.tc.mobile.mwd.runtime.fwk.dispatcher.http.SimpleHttpServer.handleRequest(SimpleHttpServer.java:215)
         at com.sap.tc.mobile.mwd.runtime.fwk.dispatcher.http.SimpleHttpServer.run(SimpleHttpServer.java:164)
         at java.lang.Thread.run(Unknown Source)
    "/></Server></XBCML>
    The applicationhas been built according to the mobile application development steps for Mobile application for laptops through NWDS.As i m new to it please help me to solve the issue .

    Thotheolh wrote:
    I was thinking that the String format of the key retrieved in the getKey() of treating it literally as a byte[].It does not work like that.
    >
    Example is that you retrieve the String key = "B@12rty]"; The only way you would get this is if you had taken the toString() method on an array of bytes. The toString() method of an array does not give one a String representation of the content of the array - it just gives you a pseudo reference to the array which is of little practical use.
    How do you convert the String into byte[] byte as exactly "B@12rty]" so that when you do a do a System.out.println(byte); it would return "B@12rty]" rather than other things.See my comment above.
    >
    In simple terms , treating the String as a byte[] by literally taking the String is the byte[] without converting it into something else so to save the trouble.Strings contain characters. Bytes are not characters so Strings should not be used as containers for bytes.

  • Stock transport order getting closed with partial delivery

    I have a problem here .Stock transport Order gets automatically created in SAP ( by means of inbound IDOC).
    Suppose the STO Quanity is 10 pcs and delivery note is of just 5 PCS.
    The STO Purchase Quanity changes to delivery note Quanity i.e 5 pcs and changes the status of the STO to close .
    Delivery note also gets created automatically by incoming IDOC.
    I think this is a problem with some custom program logic which processes the delivery note for the STO,
    Anyone who has faced this scenario before , pls help whether this is SAP standard ??????

    I am not sure because what happens is if order quanity is 10 pcs and delivery note is 5 pcs , the PO order Qty changes to 5 pcs and gets closed,
    I think this is not SAP standard and hence it could be related to some ABAP Program behind.
    Please clarify.

Maybe you are looking for