CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2007
    Posts
    41

    [JFrame] Child frame flash on parent frame focus attempt

    I have no clue how to word this but basically how do I make it so when a user tries to click the parent frame of my application they must first dispose of the child frame and when they try to give focus to the parent frame the child frame will flash.

    Example: Open Notepad and go to Help >> About Notepad. Now try to click back on Notepad without closing the About Notepad window.

    How is the above accomplished and what is it called because I have no clue what to call it and this is as best as I can think of how to word it.


    Thanks.

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: [JFrame] Child frame flash on parent frame focus attempt

    I'm guessing you need to use a modal dialog (JDialog) for the child frame. This will prevent focus returning to the parent until it is closed.

    See How To Make Dialogs and How To Use Modality In Dialogs.

    If you understand what you're doing, you're not learning anything...
    Anon.
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  3. #3
    Join Date
    Dec 2007
    Posts
    41

    Re: [JFrame] Child frame flash on parent frame focus attempt

    Worked perfectly. Thank you .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured