Browser window gains focus :-(

Hello,
I am starting an applet... this applet loads data from the server, which is came from. After its gets the data it visualize a JFrame... so no JApplet window appears in the browser window... the JFrame is the actually user window....
Under Mac OS X it runs fine... but under Windows XP SP2, Firefox, IE 6, Java 5 latest I do have the problem, that the browser window, which the applet loads comes in foreground when the JFrame is set to visible.... I have to click on the JFrame to use it...
has anybody an idea how I can give the focus the JFrame and not the browser window under windows? That would be nice....
Thanks guys.

Maybe toFront()? Saw it in the API, it looks appropriate, but I haven't tried it myself.

Similar Messages

  • Using web.show_document the first time makes new browser window lose focus

    Hi,
    In our application we use show_document(url, '_blank') to open our reports (as pdf) in a new window.
    Our environment is Application Server 10g Release 2 with Forms 10g Release 2 and jinitiator 1.3.1.22.
    The first time I call a report, the new browser window containing the pdf is shown but loses focus after about 1 second. The focus is then returned to the applet window. When calling a report again it always keeps the focus.
    After closing the applet window and restarting the application, the same thing happens: first report called loses focus, all others keep the focus.
    Does anyone have any idea why this is happening? We want the focus to stay on the new browser window every time...

    Hi Jeroen,
    I m also facing a problem something similar to yours. If you got any solution please let me know.
    Problem-
    Currently my application is running on Forms 9.0.4.2 and my form calls another third party which displays the image in image viewer in new browser. When user clicks on the button to display image, then I m using the following Code -
    -- Method: displayDocuments ([Ljava/lang/String;)Ljava/lang/String;
    FUNCTION displayDocuments(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JARRAY) RETURN VARCHAR2 IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
    RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'com/hli/imaging/adapter/LK_FormsImagingAdapter', 'displayDocuments', '([Ljava/lang/String;)Ljava/lang/String;', args);
    END;
    Image is displaying fine but the focus is staying on the newly opened browser. I want it to get back the focus to the forms window.Is this possible ???
    Thanks in advance
    Sai                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Windows not gaining focus...

    Hello!
    After recent update (I can't recall having this issue before) windows that previously had focus, but lost it after I opened a new window, do not gain focus after I close the new window. This is very irritating, because now I have to click on the old window all the time, even though it is the top window, to give commands to it.
    The same thing happens also when switching spaces - if I have a window with focus in one space, quickly switch to another to check something (without clicking anywhere) and then go back to the first one, I have to click in the window otherwise I can't write or send commands to it. Even though the cursor is in the window and blinking as if it had focus (if it is an input field).
    A concrete example:
    I am writing this text in Firefox in a textbox on a webpage. I switch spaces forth and back. The cursor is still in the textbox and blinking, but whatever I press nothing happens. Firefox is still the active application (it has the menubar).
    I've tried searching, but wasn't lucky to find anything, is it just me?
    BR,
    stormmind

    It work well in my system. Either on appletview and browser.
    Firefox 3 on Debian Lenny, java 1.6.0_07-b06

  • Save As dialog box does not gain focus (bring to foreground) with Windows 7?

    Hello,
    I've got several users with Microsoft Windows 7 (64bit) and Adobe Acrobat 9 Standard (OEM) with the same problem.  When you go to Print to your PDF Printer, the Save As... dialog box does not come to the foreground and gain focus.  Most often it just sits in the taskbar blinking to get their attention.
    However the users get frustrated and often don't realize the Save As box popped up at all.  They did not have this problem with Windows XP.
    I actually can replicate the problem on my own PC.
    Any workarounds for this behaviour?
    Thanks,
    -Tim

    This appears to be a Windows 7 focus issue.
    You can back up your registry and try the fix below, it worked for me.
    Fix number 1
    1. Open Start >> Run and type “regedit” (without quotes)
    2. Navigate to the following path:
    [HKEY_CURRENT_USER\Control Panel\Desktop]
    3. Right Click on the empty space and create a new DWORD value, or modify the existing value named ‘ForegroundLockTimeout’, set or modify the value to 0. (this value will cause the application to take the focus instantly.)
    4. That’s it Done, exit registry and restart windows for changes to come into effect.

  • Applet in a browser page  doesn't gain focus with JVM 1.6.x

    Hi,
    I have a problem to move TAB in a IE browser page with applet in a tag object using JVM 1.6.x
    with JVM 1.5_10 or above this is possible. You can move focus between elements page and enter and exit to applet object.
    Executing the same applet with the same JVM, but after installation of the latest 1.6 plugin, when applet gains focus it doesn't release it.
    With JVM 1.6, applet can't gain focus and manage keyevents; all keyevents are intercepted from browser (eg: IE toolbar elements are activated) .
    I need to move focus on elements of browser page with tab, and enter and exit from applet to make my application accessible event not using mouse !!
    (you can watch a recorder right sample here: http://www.vista.it/ing_vista_0311_video_streaming_accessibile_demo.php)
    Note that FireFox doesn't work at all, even if bug seems fixed https://bugzilla.mozilla.org/show_bug.cgi?id=93149
    Please advise.

    Hi,
    We have found a wor around for this problem.
    The following option has been unchecked and the applet could be loaded.
    Go to java control panel
    Under the Advanced Tab
    Under the Security section
    Uncheck the last option "Use TLSv1.0".
    This makes the applet work.
    But could not understand as why this is creating a problem.
    We have tried to include TLSv1.0 in the cipher suite of our apache server, while keeping the above option in java plugin control panel checked, but even that did not solve the problem.
    Please help me of how should I proceed for this problem, as I am totally stuck.
    Thank you.

  • Giving Stage Focus When First Opening In Browser Window - How??

    Is there any reliable way to give the stage focus when you first open it in a browser window WITHOUT first clicking on the stage? By reliable, I mean something that works across different browsers and on both PCs and Macs.
    I've seen numerous threads on this subject, and I've read the Adobe tech note, and it seems there is no reliable way. This is a joke, right???? How in the world can Adobe ask people to use Flash and not provide a reliable way to give the stage focus on startup. Requiring the user to click on the stage first is totally stupid.
    Has this problem been solved since all the other threads were posted, and if so, what's the solution?
    Thanks.

    for online swfs, it's a security issue and there's no reliable way to do it.  for local files, it's straight-forward.

  • Installing apps from dmg file package content windows doesn't gain focus

    When I download a dmg file and double click to mount, after it mounts, the window containing the package contents never gains focus and stays hidden behind the rest of the windows that are open and I have to use Expose to find it. Is this an error or setting I've missed? On my friend's iMac it works fine but not on my MacBook Pro and we both have Snow Leopard.
    Thanks

    Ok the first option didn't have any effect. When I opened the dmg from Chrome it loaded the window in the background.
    Dragging the dmg onto the DiskMounter app worked. The window opened allowing me to drag the App to the Applications folder and was in focus.
    I have a similar issue when I open an archive(zip) file from chrome/safari/firefox it shows the progress of the unarchiving bu then the finder window that would normally come to focus displaying the unarchived folder is hidden behind my other open windows.

  • Browser window focus behaviour

    Hey all, I am not sure if this is the most correct form for this, so feel free to let me know if there is a more appropiate one....
    Within my organization, Sun Java is really causing a lot of frustration with how some of our web pages are working. The scenario is this...
    1) user views details regarding a specific issue on a web page
    2) user enters some data in textbox and then clicks button to email someone else
    3) pop-up is displayed for the user to enter data for email
    4) original page 'reloads' itself, which Sun Java then seems to cause it to steal focus again.
    5) user thinks email window is gone, even though it has only moved behind original window.
    Sometimes it takes a couple of seconds for the original window to steal the focus back, it there is a lot of data to display, so the user could already be typing in things, and then have a different window take focus.
    We need to maintain some sort of 'reload' on the original page, in case any data changed on the page before the user clicked on the 'email' button, or other buttons, etc.
    Our users are VERY annoyed by this. If we turn off Sun Java and use the MS jvm, it works fine. For some web apps, we need Sun Java though.
    Users are on a variety of Sun Java versions, 1.41 to 1.5. at the least.
    Any ideas on how I can change this behaviour?
    Thanks,
    Craig

    I think that that's just the nature of the food-chain. It works much the same way that the browser's document window loses its ability to trap an event if that very same event is being trapped by an applet contained in the browser's window. I suspect that while you cannot programmatically give focus to the terminal emulation panel, it is possible for the user to click and give focus to the panel. What you might want to do is to create a popup that doesn't require a user's response.
    V.V.

  • Browser window focus

    Can anybody think of a reason why doing a requestFocus on a JPanel-subclass terminal emulation panel in an Applet would fail to get the keyboard focus back to the emulation panel, much less bring the browser window back to the front? The emulation panel in question handles all of its own keyboard and mouse input, and this is occurring after a non-modal JDialog (which I very specifically do NOT want to give focus to) is popped up with the Swing default owner frame as its owner. (The whole point of popping up a non-modal dialog, and immediately taking the focus away from it, is to provide a convenient, movable, top-level container, without wasting valuable title-bar space on minimize or maximize buttons, in which to display an image.)

    I think that that's just the nature of the food-chain. It works much the same way that the browser's document window loses its ability to trap an event if that very same event is being trapped by an applet contained in the browser's window. I suspect that while you cannot programmatically give focus to the terminal emulation panel, it is possible for the user to click and give focus to the panel. What you might want to do is to create a popup that doesn't require a user's response.
    V.V.

  • Open .swf in full-screen browser window?

    Hi there! I would appreciate if someone could help me with this:
    I have a .swf that I embed in an .html file. When loaded, the html file opens up in a window with the application taking up only 50% of the window. I'd like to have the application open in a window that's full screen. Is that possible at all?
    The .html file I'm using is a standard one generated by Captivate and looks like this:
    <!-- Copyright [2008] Adobe Systems Incorporated.  All rights reserved -->
    <!-- saved from url=(0013)about:internet -->
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Title</title>
    <script src="standard.js" type="text/javascript"></script>
    </head>
    <body   bgcolor="#ffffff">
    <center>
        <div id="CaptivateContent"> </div>
        <script type="text/javascript">
           var so = new SWFObject("myfile.swf", "Captivate", "891", "551", "10", "#ffffff");
            so.addParam("quality", "high");
            so.addParam("name", "Captivate");
            so.addParam("id", "Captivate");
            so.addParam("wmode", "window");
            so.addParam("bgcolor","#ffffff");
            so.addParam("menu", "false");
            so.addVariable("variable1", "value1");
            so.setAttribute("redirectUrl", "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash");
            so.write("CaptivateContent");
        </script>
        <script type="text/javascript">
            document.getElementById('Captivate').focus();
            document.Captivate.focus();
        </script>
    </center>
    </body>
    </html>

    Hi,
    What do mean by browser window?
    If you mean the File>Open dialog, double click on the Title bar to get it back to a smaller size.

  • Firefox 3.6.8 does not recognize subsequent mouseclicks - window loses focus

    After updating to firefox 3.6.8 on my macbook pro (OS X 10.4.11) Firefox fails to recognize subsequent mouse clicks. You can access the page initially, but then it seems to lose focus and become unresponsive to mouse clicks until you do something to break the cycle (clicking on desktop, minimizing and resizing window, etc). I reinstalled Adobe Flash update using full installer, since others have suggested that as a possible cause, but no joy. The browser window still does not recognize mouseclicks after an initially successful page load. You can tab to the next window (for example, if you want to enter something in search) but you cannot CLICK to enter the search window, nor can you click on links on the page, etc. It is totally unresponsive.
    == This happened ==
    Every time Firefox opened
    == I updated Firefox to the version just before 3.6.8 -- then I updated to 3.6.8 to see if that fixed it -- it's still broken

    This started happening to me yesterday. All plugins are disabled, didn't help. All plugins uninstalled, didn't help. Downgraded to SP3, didn't help. I've also noticed this happen in Thunderbird, though it seems OK now.
    Sadly I've had to start using IE8 :(

  • Opening a new browser window in APEX

    Hi.
    I am trying to open a new browser window in APEX (v2.1) for a new Navigation Bar Entry.
    What I did is the following:
    1) Created the new Navigation Bar Entry
    2) On the properties of this entry I put the Target Type: "URL"
    and on the Target: javascript:window.open('f?p=&APP_ID.:63:&APP_SESSION.:::::' , 'Despre','scrollbars=1,resizable=1,width=400,height=600');
    when I click on my Navigation Bar Entry, the page 63 opens on the same window,NOT on a NEW browser window.
    Can you please help ?

    It seems that I found the answer.
    I had to do the following:
    javascript:(window.open('f?p=&APP_ID.:63:&APP_SESSION.:::::', 'Despre','Scrollbars=1,resizable=1,width=400,height=600')).focus();
    and then logout and login back in the application and it worked.

  • Issues showing PDF files in web-browser (Windows 7 x64, 32-bit version of AdobeReader X)

    I'm not sure if this is the right way to share my experience, but at least I know Google will discover this thread eventually and maybe someone else will find what I have been looking for the past 3 hours
    I'm deploying the 32-bit based AdobeReader X (http://www.adobe.com/support/downloads/detail.jsp?ftpID=4950) to Windows7 32-bit and 64-bit based machines. This is a MSI deployement done through our Active Directory. Everything goes well - no errors. Except for the x64-based machines having trouble showing PDF-files in the web-browser.
    I used Adobe Customization Wizard X to customize our MSI installation - this showed out to be the solution once again.
    Common for the installation on Windows7 32-/64-bit were that the value in the registry database for HKCR\Software\Adobe\Acrobat\Exe (Default) was set to "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe". This is valid for the 32-bit installation as Program Files is situated in C:\Program Files, but since it's a 32-bit edition of AdobeReader that I'm installing on the 64-bit based system as well, it's installed in C:\Program Files (x86) and the reference in the registry database to "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" is therefore not valid - which explains why PDF files could not be displayed in the web browser. Changing the registry to "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe" solved it. Now this is a manual solution which might be useful on 1-2 machines but on a bigger scale it's not the right way to do it.
    I could change it with a batch/vbs script but still this is only a solution of the symptom and not a solution to the core issue. I therefore focused on Adobe Customization Wizard X again.
    The problem was easily solved. I opened the MSI file, loaded the transform file that I've made previously. Went to Registry > HKEY_CLASSES_ROOT\Software\Adobe\Acrobat\Exe . I then changed the (Default) value from "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" to "[INSTALLDIR]Reader\AcroRd32.exe", generated the MST file and replaced my current one for distribution. Problem solved! :-) The entry in the registry now shows : "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe" and PDF files are open without any issues.
    I hope someone can save a bit of time on this one.
    Best regards!
    Alex Mikkelsen

    I was able install and view the files in adobe reader 10.1.1 and in web browser window 7 64 bit machine.  But when I go to Edit-preferences-internet and  unchecking "display PDF in Browser" , I am not able to view the pdf files in ie 9 browser.  I have used this javscript to check for pdf version.
    Immediately after installing adobe--
    when I do adobe test in ie 9---https://courses.worldcampus.psu.edu/public/diagnostics/Acrobat.html--  launches a test pdf file--Acro_Test.pdf
    After unchecking-- it stays in the  https://courses.worldcampus.psu.edu/public/diagnostics/Acrobat.html instead of showing test pdf file--Acro_Test.pdf
    Tried to go back to "display PDF in Browser"--it is showing it is checked(eventhough I did not check it)
    and in ie
    it stays in the https://courses.worldcampus.psu.edu/public/diagnostics/Acrobat.html instead of showing test pdf file--Acro_Test.pdf

  • Opening a browser window from a CHM (Win7)

    Hi All,
    I'm having a problem where a script we've had for years to open a special window (sized, no browser buttons, etc) for certain content is no longer working correctly in Windows 7.
    Here is the script:
    function OpenWindowSize(strUrl, u_width, u_height) {
    var w_width = ",width=" + u_width;
    var w_height = ",height=" + u_height;
    var strOptions = "scrollbars=yes,resizable=yes"
    strOptions += w_width;
    strOptions += w_height;
    strOptions += ";";
    var newWin = window.open(strUrl, "newWin", strOptions);
    //     newWin.document.close();
      newWin.focus();
    WinXP & Vista: a link within a CHM correctly opens a new window with only scroll bars, and resizable, with the specified dimensions (e.g. u_width=500, u_height=700)
    Win7: a link opens in a regular browser window with full menus, etc and not sized to the specified dimensions. An error also displays in the CHM file.
    CHM error message (snippet): 'newWin' is null or not an object.
    A developer managed to get the CHM error to go away by adding if (newWin != null) above the focus() line.
    He also managed to prove that the problem only exists within CHMs. When the same javascript is used in plain HTML, the window is called correctly, as per the WinXP & Vista example above.
    Does anyone know how to get my script working in Win7 so that it is sized correctly and doesn't have the menus/buttons?
    Thanks,
    Amber

    Hey All,
    I just got a message from PatricioV2, for this...I totally forgot to come back to the forum...I was so busy trying to work out the solution that now, I forget the specifics, but I did find out that there is NO WAY to customize a pop-up window from a CHM with IE 9 or 10 installed...any pop-up will have ALL the browser timings. And since I didn't want that effect, I abandoned that idea and pursued a different solution.
    However, I was able to use jQuery Colorbox...which really surprised me. But even with this, you cannot use "linked" images from the stylesheet so the controls don't show...so, you need to "style" the elements with color values (i.e. background, borders, etc.).
    Also, and very important, if your content is in an IFRAME in the CHM (which mine was), you MUST use a jQuery technique to get your colorbox to work on the PARENT window...otherwise, the colorbox effect will happen ALL INSIDE THE IFRAME...
    ...and on a side note: the code in the original post is very close to the code I was using...but all I needed to do was define the value of NULL and the script worked without any errors (which is in a post above)...but not being able to style the pop-up just ruined it for me...

  • Opening a browser window

    My issue is as follows:
    Our application consists of images and forms. We display the image in an image viewer, on left half of the screen and the form on the right half.
    When we display the image in a browser using web.show_document the image gets displayed fine but the focus remains on the newly opened browser window. The user has to click into the form to start entering information from the image into the form, losing valuable time in a high volume processing environment.
    Is there a way other than using web.show_document (foreign functions/Java/any other technology) that will allow me to open a browser window from the form and then send the control back to the form?
    Thanks
    SP

    Hi,
    check this one
    WEB.SHOW_DOCUMENT
    Frank

Maybe you are looking for