Problem with applet, popup window and focus loss

Hi all !
I've got a problem when my applet lose the focus. Let me explain :
I've got an applet embed in a jsp page. There are several buttons in it that allow the user to open modal windows.
The problem comes when the user gives the focus to another application whithout closing the modal window first.
When he tries to come back to the web page owning the applet (using the task bar), then the modal window stays behind it and blocks any action on the applet.
Does anyone know how to force the modal window to be displayed in front of the applet, even when the user plays with focuses ?
Thank's in advance.

thank you for your help, sils.
I've written that code :
* Cr�� le 31 ao�t 05
package com.scor.apricot.web.rpc.ltnp.applet.listener.ldf;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JDialog;
import javax.swing.JPanel;
public class AppletWindowListener extends WindowAdapter {
     private JPanel panel;
     private JDialog dialogWindow;
     public AppletWindowListener(JPanel panel, JDialog dialogWindow) {
          this.panel = panel;
          this.dialogWindow = dialogWindow;
     public void windowActivated(WindowEvent e) {
          if (dialogWindow!=null && dialogWindow.isShowing())
               dialogWindow.toFront();
}Is that right ?
I don't know how to add the listener, where must I put the addWindowListener method ? It seems that this method cannot be used with a JApplet object.

Similar Messages

  • Problem with Pop up windows and struts

    Hi
    I have problem in working with pop-up windows and struts.
    I have parent page which basically lists some data and has a button for adding new record. when I press that button a child windndow will be opened for data entry. The child window has submit button to save data.
    when I press the button for save, It will go to action class and saves it in a database and forwards a new page.
    but I do not want to forward any new page. If any exception is raised during database saving, a message should be showed in child window otherwise the child window should close and the parent window should get refreshed.
    Can any one write me how we can handle this in struts.
    Thanks in Advance,
    SR

    This has nothing to do with struts, you can do the same with some plain JavaScript. Do the following...
    1) On error, forward to a error page
    2) On success, forward to a temp.html page.
    The code in temp.html would be like this
    <html>
    <head><script>
    window.opener.reload();
    self.close();
    </script></head>
    <body>Closing...</body>
    </html>Cheers
    -P

  • Problem with IE8 popup blocker and Windowless mode

    My team is having popup blocker issue, which is crippling our system where a large range of users are now complaining that their links or buttons will not open in IE7 or IE8 and results in the pop-up blocker message.
    Our Flash application's embed code needed wmode set to windowless ('opaque' or 'transparent') since we need to place floating HTML objects over the Flash application. But all links (within static text content) with target set to '_blank' or a custom name and also all navigateToURL() methods with the same target values are now resulting in IE pop-up blocker message once the window mode was changed to 'opaque' (same result also with 'transparent').
    We have a AS3 work around for the navigateToURL() method but no solutions for 100s of pages of simple HTML content contributed by users that have links as well as our own Flash static-text content with links.
    Here is a simple page created to demonstrate the issue - http://clients.projectmiso.net/photobiz/custom_lightbox/Test_File.html
    And the ActionScript 3 code -
    var clickFunction = function(){
        var targetURL:URLRequest = new URLRequest("http://www.yahoo.com");
        navigateToURL(targetURL, '_blank');
    btn1.addEventListener(MouseEvent.CLICK, clickFunction);

    Hi!
    One thing you could try is to use MOUSE_UP instead of CLICK
    ( tip-source : http://www.actionscript.org/forums/showthread.php3?t=176795 )
    This example uses clickTag parameter (through flashvars) instead of a hardcoded URL inside the flashfile though,
    but I'm sure you get the point:
    clickBtn.addEventListener(MouseEvent.MOUSE_UP, function(event: MouseEvent): void {
    var sURL: String;
    if ((sURL = root.loaderInfo.parameters.clickTag)) {
    navigateToURL(new URLRequest(sURL), "_blank");
    clickBtn.buttonMode = true;
    clickBtn.useHandCursor = true;
    Or you might want to have a look at this workaround :
    Example :  http://apdevblog.com/examples/navigatetourl/
    Info : http://apdevblog.com/problems-using-navigatetourl/
    /Ola

  • Strrange problem with Acrobat Reader 9 and power loss

    Hello,
    I have a Lenovo T61P (6457-A26) with Windows XP, and I have found a very strange behaviour with Adobe Acrobat Reader 9.
    Sometimes I open a PDF, and I read one or two pages, and then my laptop has a problem like a power loss (remove of the batter).
    I can read those PDF on other PC/MAC/Linux, ... no problem at all.
    So I'm thinking about an incompatibility with my laptop and Acrobat Reader...
    So for now, I've installed another PDF viewer (FoxIt), and I can open my PDF without fearing this lost of power...
    Did somebody experienced something like that? If yes, are there some solutions?
    Alessandro

    1. It happens with any file i want to open in browser.
    2. The Problem is specific to browser. When I open a document in the Reader application everithing works fine.
    kind regards
    Marcel

  • I downloaded a new version of firefox. It said it had problems with my norton toolbar and now it doesn't feature it in the window. I'm not that comp savvy. How do I either get the Norton toolbar up or go back to the old firefox? Thank you.

    I downloaded a new version of firefox. It said it had problems with my norton toolbar and now it doesn't feature it in the window. I'm not that comp savvy. How do I either get the Norton toolbar up or go back to the old firefox? Thank you.

    Please authorize ADE 3 with same credentials that you used with older version of ADE

  • I am having trouble with my mac book air. I think I have a virus because everytime i click on a link it openes up popup windows and other things. How do I reset teh computer?

    I am having trouble with my mac book air. I think I have a virus because everytime i click on a link it openes up popup windows and other things. How do I reset teh computer?

    Please post a screenshot that shows what you mean. Be careful not to include any private information.
    Start a reply to this message. Click the camera icon in the toolbar of the editing window and select the image file to upload it. You can also include text in the reply.

  • Javascript to open popup window and disable parent window

    Hello,
    Can anyone please help me the javascript issue.
    I have a button which opens up a pop window and when this popup window is opened i want to disable the parent window and enable it when i close the popup window.
    can anyone please help me with a possible approach.
    Thanks,
    Orton
    Edited by: orton607 on Aug 25, 2010 2:19 PM

    jari,
    I have a problem with this modal window approach and I have noticed. The thing is I am able to open up a popup window which is a simple data entry form. In this form i have the button Create which calls a javascript function and then an pl/sql insert process.
    Below is the javascript function for the button create
    function createNew()
    doSubmit('CREATE');
    alert('Successfully inserted the record. Click OK to close popup window and to \n view details of the new inserted record please select the table on parent window.');
    window.close();//close the popup window
    window.opener.doSubmit('REFRESH');
    //call doSubmit function on the parent window to cause the page to refresh.
    }The problem, i have is when i open up a popup window in this window when I click on the create button, its again opening up a new empty window. i don't understand what might be the problem.
    can you please help me out with this one.
    thanks,
    orton
    Edited by: orton607 on Aug 25, 2010 4:19 PM

  • Problem with shares on Windows 2003R2 server from a Windows 8.1 PC

    I'm having problem with shares on Windows 2003R2 server from a Windows 8.1 PC.  It times out when I try to copy a file from my PC to the server and I get an error message saying "There is a problem accessing network drive W:\. Make sure you are
    connected to the network and try again."
    I have no problem copying files from the server to the PC.
    Any ideas?

    Hi,
    How about your problem now? Have you test other machine also installed Windows 8.1? Did they have this problem?
    To diagnose this problem, firstly, please check Windows 2003R2 firewall settings, also can disable firewall temporarilly for test.
    Secondly, try to use Network Monitor to capture network communication package for test.
    Network Monitor:
    http://www.microsoft.com/en-us/download/details.aspx?id=4865
    Roger Lu
    TechNet Community Support

  • Windows 8.1 Problem with games from windows store.

    I've got a problem with games from windows store. The installation is going well without any problems, however when I try to open it it's loading and then it turns off. The same problem happens when I try to use Games for Windows. I've use a sfc scan and
    it shows some errors but unfortunately it cannot fix them. Should I share the CBS log or find the solution somewhere else? I hope you help, best regards.

    Hi,
    According to my experience, the problem like store game app open failed probably caused by hardware driver. such as Audio and Graphic driver. So, first of all, please try to reinstall these two driver to fix this problem for test.
    In addition, for SFC scan failed problem, it can be caused by many reasons, I would suggest you use another command to fix your system for test.
    Dism /Online /Cleanup-Image /ScanHealth
    Also you can test SFC command in Windows 8.1 safe mode.
    Thirdly, if problem persists, please check Event Viewer, generally speaking, it would record the app open failed events.
    Roger Lu
    TechNet Community Support

  • My iPod says there's a problem with my last purchase and every time I try to look at my history to clear the problem it says there no connection to ITunes

    When I log into my acc it ammediatly says there's a problem with my last purchase and to go to my purchase history to clear it.  When I hit continue its suppose to take me to the history but it just loads then says cannot connect

    the itunes says that it knows that there isan ipod there, but it doesnt recognize it. I have reset the ipod, restarted my computer, and reinstalled itunes.
    Doublechecking. Have you tried a complete uninstall of both iTunes and all the other related software components (Apple Mobile Device Support, Apple Application Support, etc ...) and then a reinstall? If not, try the instructions from the following document:
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8

  • Problem with the Finder window in Chrome

    Hello,
    I have a problem with my finder window in Chrome.
    Since the window isn't a separate window anymore, but stuck to the top of the webpage, my finder window is too big. I can't read the "Cancel" or "Send" (I have no idea what's supposed to be there in English but I assume it's something like "send" and "cancel") buttons. I have provided some images of the problem, even if I make the Chrome window as small as possible, the finder window still is too big for my screen. I can resize the finder window from lest to right, but not up or down, which is extremely irritating for me.
    If anyone can help me how I can solve this problem.
    Thanks!

    I found the solution on another thread...Here it is.
    "I was having the same problem.  I found a way to make it smaller.  First, I opened chrome and clicked the green button on the window to make chrome go into full screen.  Then I tried to save a file to make the finder window open in chrome. When it opened in full screen I could see the bottom of the window so I resized it to make it a little smaller.  Once I did this it remembered the size so now I can access the bottom buttons when I take it out of full screen mode. Hope this helps."
    Worked like a charm!

  • I have a problem with the effect gallery and the saving libraries in Illustrator CS6

    Hi everybody
    I have a problem with the effect gallery and the saving libraries in Illustrator
    1. When you go to to effects > effect Gallery the the sketch filter always is black and white. Is this normal? In Photoshop you can set your background and foreground and the sketch effects takes those colors. Is there any way to do this in Illustrator? I have tried changing the colour of the fill and stroke but nothing...
    2. In the same area as before effects > effect Gallery .... In Photoshop you can add multiple filters with the create new button. Always is off is there anyway to make it available? or the only way is to by creating several individual ones and manage then in the appearance panel ...
    3. I saved a brush library and now it appears in the user defined area so I can get it in any document, that is good but any one knows how to delete a user undefined library?
    Many thanks in advance for the help .... I look forward for the reply =)

    I see that it is six months ago that I first posted this. Nothing has changed. When I use affixa to create a message with an attachment from my gmail account in firefox, the message is created in drafts, but the gmail window is closed and I have to re-open it. Not critical, but annoying.
    Now there is a plug-in on the affixa site that is supposed to be designed for Firefox, and which affixa support claims should take care of this. And I've downloaded it twice. When you download it and open it, it says that it will be installed when Firefox restarts, and gives you a button to restart Firefox. But after you click that button and firefox disappears and re-appears, the affixa plug-in is NOT in the plugin list.
    Please, somebody, HELP.

  • Close popup window and refresh the parent window

    Hello,
    I have a button in a normal report, when clicked opens up an popup window which is a form containing some items and here in this form (i have some editable text items) I make some changes and click on the apply changes button -- this should update the form, close the popup window and should refresh the parent window.
    can anyone please help me out with this issue.
    Thanks,
    Orton

    you have your popup window. When they apply the changes you want it to close the window, right?
    Modify the button (save, apply changes) and give it url redirect to the custom function you create (See below): javascript:saveChanges();
    in the page header, add a new function:
    <script type="text/javascript">
    function saveChanges(){
         doSubmit('SAVE');//this is the line to save the current form on the popup window. (This assumes SAVE is the request value that should udpate the db)
         window.close();//close the popup window
         window.opener.doSubmit('REFRESH');//call doSubmit function on the parent window to cause the page to refresh.
    </script>

  • Popup window and navigate to home page visual web part SP 2013

    I've a visual webpart where i am inserting items in the list in the button click event as below
    protected void btnSubmit_Click(object sender, EventArgs e)
    SPSite site = new SPSite(SPContext.Current.Site.OpenWeb().Url);
    SPWeb web = site.OpenWeb();
    SPList list = web.Lists["Request"];
    SPListItem item = list.Items.Add();
    item["Title"] = txtBoxTitle.Text;
    item.Update();
    Now after items is being added in the list i want to show popup window with message showing that
    "item has been inserted and click here to go to home page of the site"
    how do i achieve this can anyone help in this
    Note:there is a restriction in our requirement so only sandboxed solution can be used so i want resolution for sandboxed solution 

    You can' t use criptManager.RegisterStartupScript for redirection in sandbox solution.
    Please find the below reference
    http://social.msdn.microsoft.com/Forums/office/en-US/bd37b640-e225-41c0-8344-9f3b52fe0434/open-popup-window-and-redirect-user-to-home-page-in-sandboxed-solution?forum=sharepointdevelopment
    You have one more option to open a popup SP.UI.ModalDialog
    Please find the below reference
    http://msdn.microsoft.com/en-us/library/ff798375.aspx
    http://blogs.msdn.com/b/chaks/archive/2011/09/14/modal-dialog-box-in-sharepoint-sandbox.aspx

  • Having trouble with pop-up windows and ads for MacKeeper

    I've been having trouble with pop-up windows and ads for MacKeeper and similar "services." Tried to download "MPlayerX" a week ago and it all started then. I thought I deleted the file but I'm still having trouble. I've been digging for solutions on here, but nothing I've found on here has worked yet--the VSearch stuff (I think) isn't on my hard drive. Any advice?

    You installed a variant of the "VSearch" trojan. Remove it as follows.
    This malware has many variants. Anyone else finding this comment should not expect it to be applicable.
    Back up all data before proceeding.
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.venus.agent.plist
    Right-click or control-click the line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.venus.daemon.plist
    /Library/LaunchDaemons/com.venus.helper.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/venus
    /System/Library/Frameworks/v.framework
    The problem may have started when you downloaded and ran an application called "MPlayerX." That's the name of a legitimate free movie player, but the name is also used fraudulently to distribute VSearch. If there is an item with that name in the Applications folder, delete it, and if you wish, replace it with the genuine article from mplayerx.org.
    This trojan is often found on illegal websites that traffic in pirated content such as movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow. Never install any software that you downloaded from a bittorrent, or that was downloaded by someone else from an unknown source.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Then, still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates (OS X 10.10 or later)
    or
              Download updates automatically (OS X 10.9 or earlier)
    if it's not already checked.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

Maybe you are looking for

  • Save button is not working for ONE CLICK ACTION

    Hi All, We have embeded a custom table view in a standard component.While we are editing the first row of the table view by ONE CLICK ACTION & pressing the SAVE button of overview page,then the record is saved in the database. But if we edit any row

  • In need of desperate help 14yr old daughter's iPod is  a mess.

    When I plug it into the computer it is not showing up, although it makes the sound that it's connected. It just keeps saying "Do not disconnect" and is burning hot. I've tried to reset it and restore it. Now there are no songs on it. When I press sel

  • Back ground job scheduling in BDC

    Hi , Can anybody explain about back groung job scheduling in BDC program.

  • Can't Install Proper Version

    I downloaded the correct version for my OSX processor.  When I tried to install it, a dialogue box came up saying I couldn't because "devices with PowerPC are no longer supported."  It instructed me to download a version for PowerPC, but that's not w

  • HT1918 How can I cancel an automatic subscription renewal and receive refund?

    I received an iTunes receipt for $54.99 for an automatic subscription renewal of People Magazine for iPad. I do not want to renew this and would like this renewal cancelled and refunded. How can I do this?