Results 1 to 4 of 4
  1. #1
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default jDialog box disappears

    Hi,

    I have a jDialog box which opens when I click a button.If I move away from the window and go to some other application(check email or something) and click again on my application,The dialog box doesnt appears and my application seems stuck.

    Any pointers what is causing the issue.please help

    Thanks

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default

    Make sure you specify the parent frame when you create the dialog. Otherwise the dialog may hide below other windows and it will not be brought into focus when you click on the application.

  3. #3
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default

    Thanks for the reply.I am pretty new to Swing,Can you help me how to set or specify the parent for the dialog box?

    Thanks,

  4. #4
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default

    Sure. Read the JDialog API and look at the various constructors. The API actually refers to this parameter as the "owner" not the "parent".

Similar Threads

  1. Tableviewer content disappears on scrolling
    By gmm in forum SWT / JFace
    Replies: 2
    Last Post: 06-27-2011, 01:18 PM
  2. moving a pic, another pic disappears
    By benjamin in forum New To Java
    Replies: 4
    Last Post: 06-16-2010, 06:18 PM
  3. JLabel icon disappears
    By grease_monkey1986 in forum AWT / Swing
    Replies: 3
    Last Post: 05-09-2010, 12:43 PM
  4. Replies: 11
    Last Post: 10-27-2009, 07:55 AM
  5. text box disappears
    By okabeer in forum NetBeans
    Replies: 2
    Last Post: 07-13-2009, 06:21 PM

Posting Permissions

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