Help/Tips for writing my WindowAdapter

I'm writing a program which has many popup windows. I need some advice and tips on writing a good WindowListener/WindowAdapter so the windows act properly in regards to focus. Here is what I have:
public class PopupWindow extends WindowAdapter {
    @Override
    public void windowOpened(WindowEvent e) {
        //something to prevent the user from clicking the other window
    @Override
    public void windowClosing(WindowEvent e) {
        e.getWindow().dispose();
    @Override
    public void windowDeactivated(WindowEvent e) {
        if(e.getOppositeWindow() != null) {
            e.getWindow().requestFocus();
}Problem with this WindowAdapter is that it isn't aggressive enough when requesting focus back from the main window... one can still select things and click buttons in the other window even though the focus immediately jumps back to the popup window (which has AlwaysOnTop enabled). It also fails if the user selects a native program window, then comes back to my program, but I think it is because the WindowAdapter for the main window doesn't have a function to detect that within the program there is a popup window and to send the focus up.
Please advise, Thank you!

So can I just add() the frame of my window to a dialog box with modal enabled and the parent frame in the constructor?

Similar Messages

  • Help needed for writing query

    help needed for writing query
    i have the following tables(with data) as mentioned below
    FK*-foregin key (SUBJECTS)
    FK**-foregin key (COMBINATION)
    1)SUBJECTS(table name)     
    SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
    2           02           Computer Science
    3           03           Physics
    4           04           Chemistry
    5           05           Mathematics
    7           07           Commerce
    8           08           Computer Applications
    9           09           Biology
    2)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
    383           S1      9           4           2           3
    384           S2      4           2           5           3
    ---------I actually designed the ABOVE table also like this
    3) a)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
    383           S1
    384           S2
    b)COMBINATION_DET
    COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
    1               383          9
    2               383          4
    3               383          2
    4               383          3
    5               384          4
    6               384          2          
    7               384          5
    8               384          3
    Business rule: a combination consists of a maximum of 4 subjects (must contain)
    and the user is less relevant to a COMB_NAME(name of combinations) but user need
    the subjects contained in combinations
    i need the following output
    COMB_ID COMB_NAME SUBJECT1 SUBJECT2      SUBJECT3      SUBJECT4
    383     S1     Biology Chemistry      Computer Science Physics
    384     S2     Chemistry Computer Science Mathematics Physics
    or even this is enough(what i actually needed)
    COMB_ID     subjects
    383           Biology,Chemistry,Computer Science,Physics
    384           Chemistry,Computer Science,Mathematics,Physics
    you can use any of the COMBINATION table(either (2) or (3))
    and i want to know
    1)which design is good in this case
    (i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
    good method to link with same table but if 4 subjects only(and must) comes
    detail table is not neccessary )
    now i am achieving the result by program-coding in C# after getting the rows from oracle
    i am using oracle 9i (also ODP.NET)
    i want to know how can i get the result in the stored procedure itsef.
    2)how it could be designed in any other way.
    any help/suggestion is welcome
    thanks for your time --Pradeesh

    Well I forgot the table-alias, here now with:
    SELECT C.COMB_ID
    , C.COMB_NAME
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
    FROM COMBINATION C;
    As you need exactly 4 subjects, the columns-solution is just fine I would say.

  • Help me for writing the password script on solaris

    hi,
    help me for writing password scripts to change the user/root password.
    in the script itself myself want to mention the new password.
    now user want to login with the new password only.
    model script:
    echo $test:`perl -e '$x=crypt('$test123','test');
                   print $x'`::::::: >> /etc/shadow
    test--->username
    test123---->new password.
    the above script is not working.
    kindly help me for writing the script.
    Regards,
    raja

    Well. For one thing, if you just append the new password to the /etc/shadow file there will be two entries for the user in that file (at least if the user already had a password). Which probably is a bad thing.

  • Helpful Tips for all iOS Devices!

    Here's the link for helpful stuff, including news and tips for all iOS devices!
    El LINKO

    Thank you,
    Then, when you have to create an iphone+ipad app joined, have you only possibility to create Multifolio app type?
    Then, can you only see some multifolio options like the Android app (next link)?  
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/digitalpublishingsuit e/articles/making-and-deploying-android-dps-viewers/fig03.jpg
    So, with iPad+iPhone apps, the iPad version would be multifolio app too, that is right?
    And are these apps (iPad+iPhone) multifolio (next link)?
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/digitalpublishingsuit e/articles/making-and-deploying-android-dps-viewers/fig10.jpg
    can I only create single folio for iPads when I have iPad app alone?
    Thanks a lot for you information,

  • Adobe Illustrator Help: tips for how to get started?

    I am new to adobe products. Does anyone have any tips for someone new who is just starting out
    with adobe illustrator? I have not used it before. Any beginner tips on how to get started with adobe
    illustrator would be appreciated. Thanks

    start by reading the documentation and follow the samples shown, get familiar with the user interface, get to know where the tools are and what they do...and the most important thing practice, practice, practice.
    other than that, there are plenty of resources online, depending on your learning style, buy a book, follow tutorials, watch videos, take a class.

  • Helpful tip for those trying to use the included remote

    So this may or may not be old news but after fiddling with my Apple TV I found my iMac which is roomed in the same room as my TV going beserk.  Turns out that the remote from the Apple TV out of the box can control the iMac.  It was driving me nuts and I resorted to putting a piece of paper over the Apple logo on the front of the iMac.  A Google search later turned up some helpful advice.  You can actually disable the infared control of your iMac under System Preferences --> Security.  Just thought I'd post this for other users who aren't Mac uber users.

    From reading your post it sounds like your trying to use these
    functions in the code of a user process. These functions are
    meant to be used in a kernel driver to set up signaling to a
    user process. The user process uses signal functions, as defined
    in Richard Steven's "Advanced Programming for the Unix Environment" book and else where, to intercept the signals sent by a driver via proc_signal(). I have used them by creating ioctl() subfunctions for a driver that register and unregister a calling user process. After the registration proc_signal() can be used to signal the process that
    called the ioctl(). Care must be taken in the driver not to proc_unref() if there is no process already registered or you
    will panic the kernel.

  • Helpful tip for using Windows computers w/Airport Extreme

    Not sure if this has been posted before but I would suggest that windows users or mixed use users (windows/mac) that want to use the airport extreme basestation should uninstall any security software (antivirus/firewall) that is on their windows computers before setting up the Airport Extreme Basestation.
    I was having a lot of trouble getting my windows computers to see each other (or any other computers for that matter) despite them being able to connect to the internet and the fact that they were both on the same workgroup.
    I figured out that by uninstalling the norton software and then replugging them into the basestation that miraculously I could then see the other computers on the network ("view computers in my workgroup"). Then reinstall the security software and you should be good to go.
    Hope that helps someone and prevents hours of frustration.
    Now that I have the Airport Extreme basestation running it is phenomenal. All computers (mac and windows) can see each other and share files.

    There is another way to use the AE.. that might help your problem.
    The first thing though is to use static IP .. even in bridge that might fix it.
    You would need to use DHCP Reservation in the main router to set the IP of the Airport. This can be called different names in different devices but it is usually there.
    Then in the computer using finder, Go, Connect to server. Type in the actual IP address of the Airport.
    So
    AFP://10.0.1.100 (for example, replace with the actual IP).
    You will have a request for the disk password.. once the computer finds the network resource. Type in the password and store it in the keychain so it is not forgotten.
    I do find it interesting that apple can acknowledge that networking is that poor.. and do nothing about it.

  • Some helpful tips for iPhone unlocking

    Some of our community members have asked about questions related to the EE iPhone unlock process, however, there was no official information about it in EE support page. Therefore I'd like to share some tips about this and hopefully it will clear things up.
    You can submit your iPhone unlocking request in here: EE/Orange/T-Mobile Unlock Form.
    Please do make sure you read all requirements before submitting the request.
    If you would like to join EE and wish to unlock your iPhone from other network, you can use the following links:
    Vodafone iPhone unlock request
    O2 iPhone unlock request
    Three UK iPhone unlock request
    Apple devices differ from all other manufacturers in that there is no code required to enter into your device in order to unlock your iPhone. However EE have requested on your behalf to Apple that your device be prepared for unlock and the procedure below advises how you can complete this process.
    Before attempting the procedure, please make sure that your iPhone is up to date with the latest software version. This can be checked by connecting your device to iTunes via a PC/Mac/Laptop.
    iPhone unlock for iOS 6 and iOS 7:
    If you have a non-EE SIM Card and you've received confirmation from EE that your iPhone is unlocked, follow these steps:
    Insert a non-EE SIM card.
    Complete the setup process.
    If you do not currently have another SIM card you can use, follow these steps to complete the process:
    Back up your iPhone.
    Erase your iPhone.
    Complete the setup assistant and restore your backup.
    iPhone unlock for iOS 5 or earlier:
    Always Back up your iPhone first. 
    If you've received confirmation from EE that your iPhone is unlocked, follow these steps:
    Insert a non-EE SIM card. This must be a network provider who also supplies the iphone/ipad.
    Switch ON the handset.
    Connect to iTunes using USB cable.
    Use the “restore” option within iTunes. (located at the bottom of iTunes not the top)
    The handset may then display: USB cable and iTunes icon.
    Disconnect from USB then re-connect.
    Synchronise device with iTunes.
    Once synchronised a message will appear on iTunes stating “Congratulations, your iPhone has been unlocked”. If using IOS5 this message will not show.
    Follow on screen set up instructions to enable new carrier settings.

    Does anybody know if the unlock process has a "use by" date? I'll explain. Last year I upgraded my sons iPhone 4 to an iPhone 5. The plan was to give the 4 to my girfriend who is on T-Mobile. Various queries came up that her SIM wouldn't work in it and I would have to have it unlocked (this from staff in the local EE store who wouldn't even lend me their SIM to try it). I paid for the unlock, gave her the phone and told her to wait until I'd had confirmation that it could be unlocked. Nearly 1 year on and I'm doing upgrades again... I have a shiny new 5S so I'm going to give her my 4S and then use the 4 for work (it's better than the Blackberry they sent me). So, I back up the phone, insert my work SIM card (BT Mobile/Vodafone) only to see the message "Invalid SIM". No amount of turning off and on, resetting, wiping clean and re-loading seems to do the job. Does anybody have any ideas? I'll be damned if I'm going to pay to have it unlocked a second time and I'm told that recently even getting a paid unlock from Orange is less fun than amputating your own arm.  Incidentally, when I unlocked my 4S from Vodadone they did it in 4 days and it cost me nothing. Why do EE charge an arm and a leg and take so long over it?

  • Help tips for 4.6b installation on Fedora 8.

    Is there any particular conditions to follow while performing installation of 4.6b on Fedora 8. i did not find any documents related to it...?

    Dear Tony,
    Fedora 8 is not a supported plaform for SAP.
    Additionally, when installing older SAP releases on newer distributions like SLES10 or RHEL5 it may happen that you either have to use the EXT/EX2 kernels from SAP or install compatibility libraries for the distribution.
    Best Regards,
      Hannes
    PS: When installing on RHEL5 for example, follow SAP Note [1048303|https://service.sap.com/sap/support/notes/1048303]. General installation documentation is available at [https://service.sap.com/instguides|https://service.sap.com/instguides].

  • Help needed for writing a Query.

    I want to write a query in SSRS, SQL Server 2012, Report Builder 3.0. There is 3 tables as follows
    Table A
    ID Name
    1 AAAAA
    2 BBBBB
    Table B
    ID BS
    1 5000
    2 3000
    Table C
    ID Allowance
    Amt
    1 HRA
    500
    1 TA
    200
    2 HRA
    300
    Output Expected
    ID Name
    BS HRA
    TA
    1 AAAAA
    5000 500
    200
    2 BBBBB
    3000 300
    0
    Shareef

    This is the result from the above code: 
    id          Name       BS          Allowance   TA
    1           AAAAA      5000        500         200
    2           BBBBB      3000        300         0
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped.
     [Blog]
    But I am getting something like this.
    id          
    Name       BS         Allowance TA
    1          
    AAAAA      5000        500         
    1          
    AAAAA 
    200
    2           BBBBB
         3000        300         0
    Shareef

  • ShowModalDialog and "Unauthorized Access" for Item Help Tips - APEX 2.2.0

    Hi, all,
    Well, I have a popup that is displayed using ShowModalDialog, and that popup has help tips for some items. When I view it on my computer, regardless of whether or not I'm logged into APEX or not, and regardless of what authentication scheme I use to log into my application, I can see the help tips.
    When another user I have testing tries to view the help tip, she gets "Unauthorized Access." It doesn't matter what she is logged into or how. However, if I send her the link to the page displayed in the ShowModalDialog popup and she opens it in a regular window, she can see the help just fine.
    I did see mentions of this elsewhere in the forums. Is this Bug #5469015 : Authentication Fails On Popup Item Help Pages? If so, is there a workaround?
    Thanks!
    Don

    Thanks for all your help Scott
    I've added the -PORTAL_SSO- .....
    After this I've had a new problem same to this: Re: SSO Authentication Not Working
    "get the error below and it then directs me to http://hostx/htmldb/f? and the "p=" is missing"
    But after a lot of tests I discovered where was the problem: "The apache configuration for the proxy!!"
    This an extract from the installation doc :
    SetEnv force-proxy-request-1.0 1
    ProxyPass /htmldb http://127.0.0.1:8080/htmldb
    ProxyPassReverse /htmldb http://127.0.0.1:8080/htmldb
    ProxyPass /i http://127.0.0.1:8080/i
    ProxyPassReverse /i http://127.0.0.1:8080/i
    ProxyPass /sys http://127.0.0.1:8080/sys
    ProxyPassReverse /sys http://127.0.0.1:8080/sys
    where you replace 127.0.0.1 with the name OR ip address of your XE installation. 8080 is the default http port of your XE installation. "
    Well, I used the IP ADDRESS and in the @regapp > listener_token the NAME!!! (HTML_DB:servername.domain:80)
    I changed the IP ADDRESS with the NAME, restarted the httpd service and now all works fine.
    Emanuele

  • What is the best way   for writing cursors in while loops

    i just chage my flatform from visual foxpro to sql
    for every report part using query analyser i have to make report on any tables
    suppose : - mastempno wise report
    so i heve to use cursor or store procedure in while loop
    for searching in transaction table
    so sometime i get confunsion of using cursors two times in while loop for fetching the values
    so help me for writing some simple codes for using cusrors in while loop while can fetch all values in transaction table

    Is this what u r looking for
    A Simple Cursor Example Which gives all records
    from Employee table
    Declare
    Cursor Emp is
    Select Empno,Ename
    FRom Employee;
    Begin
    For x in Emp Loop
    :block.empname := x.ename;
    End Loop;
    End;
    Regards,
    Ashutosh

  • IPhoto Help tips don't help create new Photo Library

    I have 35 photos of folks associated with the magazine I edit. I created a separate album for them in the present Photo Library, but I would like to disconnect them from there and keep them in a totally distinct Editorial Photo Library. The Help tips for iPhoto allow for this action, but in my attempts to make it happen, iPhoto would not launch; it continues to launch only in the original way, with the lone Library and the usual albums with all their photos.
    Not wishing to risk loss of hundreds of photos, I abandoned my attempt. All I really want to accomplish is to house the Editorial photos in a completely different place. This collection will expand as the magazine takes on new contributing authors, but I don't want any of these photos intermixed with my personal albums. Part of the reason for this is that I wish to preserve my method of captioning personal photos with numerical prefixes. This is the only sure way I have found to have photos sort strictly chronologically; no alpha method works worth a fig. I would still prefer that the default launch would bring up my personal Photo Library; but it would sure be nice to be able to toggle to the only other photo library that I intend ever to use.

    I'm not sure which tip you're following. When you change the name of the "current" iPhoto library, the next restart cannot open in the renamed library on its own. Your choices are to create a new library, or locate an existing one. If you follow the steps in the iPhoto Help topic "Creating a new photo library", I don't see how you can go wrong.
    To bring up a library other than the current photo library, you would follow the instruction in the iPhoto Help topic "Switching between photo libraries". If you want to keep your several photo libraries all together in the Pictures folder, you just need different names for each of the iPhoto Library folders.
    Export the 35 photos (simply drag them from the iPhoto window) to a temporary folder on the desktop, then restart iPhoto with the new library and import the contents of the temporary folder. You can delete the photos from the initial iPhoto collection any time after you've successfully exported them.

  • Need help for writing extract program

    hi
    i need help for writing extract program to retriew data from legacy system.
    i already developed bdc programs for me31k and me21.
    my requirement is to write extract program s for those t.codes.
    to retriew data from legacy system and stored in flat file.

    i need help with a java program. it is a program that allows the user to enter a student's GPA, number of extracurricular activities, and number of service activities. The user can not enter a gpa above 4.0 or below 0. The user can not enter a negative number for the number of both activities. If the student meets the following criteria: 1) GPA of 3.8 or above and at least one extracurricular activity and one service activity, 2) GPA below 3.8 but at least 3.4 and a total of at least three extracurricular and service activities, 3) GPA below 3.4 but at least 3.0 and at least two extracurricular activities and three service activities, the message "Scholarship candidate" should display. If the student does not meet the criteria above, then the message"not a candidate" should display. Can you help me, please?
    You haven't posted ANY 'java program' for us to help with.
    The forum is NOT a coding service. It is to help you with YOUR code.
    Post the code you have written and SHOW us (don't just tell us) how you compile it and execute it and the results you get. Then we can help you with any problems you are are having.
    If you need help understanding just what the program should be doing you need to ask your instructor to clarify the assignment.

  • Help for writing a Map with out JDeveloper

    Hi all,
    Where can I find help documents or sample files so that I can write a custom mapping between an Oracle Object and Java Object. Yeh, this might be a simple task when we use JDeveloper , but just for writing this small piece of code I am not in a position to download JDeveloper of size 230MB and learn how to use it...
    Plese give suggestions...
    Thanks in advance...
    Sateesh
    null

    Take a look at the JPublisher user's guide. You can also download JDeveloper in 20MB chunks if you can't download all 230MB at once.
    Blaise

Maybe you are looking for