aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes urgent please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "urgent please help" Watch "urgent please help" New topic
Author

urgent please help

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
I have a JDialog box which requests the user for username and password. This JDialog is on top of a JFrame. My problem is if I go to resize the JFrame or click on it, it (the JDialog) disappears. Once I move the JFrame or close I realize the JDialog is under. How do I maintain the Jdialog on top. Please can someone help.
I have tried using setNextFocusableComponent() and nothing seems to work.




Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Are you setting the parent to null? You have to specify what the Dialog sits on top of.
Does that make sense?
Hope so.

------------------
Happy Coding,
Gregg Bolinger


GenRocket - Experts at Building Test Data
Durga Penmatsa
Greenhorn

Joined: Aug 14, 2001
Posts: 23
JDialog - use this constructor
public JDialog(Dialog owner,
boolean modal)
Creates a modal or non-modal dialog without a title and with the specified owner dialog.
Parameters:
owner - the Dialog from which the dialog is displayed
modal - true for a modal dialog, false for one that allows others windows to be active at the same time
hope this helps
Durga
Originally posted by john mattucci:
I have a JDialog box which requests the user for username and password. This JDialog is on top of a JFrame. My problem is if I go to resize the JFrame or click on it, it (the JDialog) disappears. Once I move the JFrame or close I realize the JDialog is under. How do I maintain the Jdialog on top. Please can someone help.
I have tried using setNextFocusableComponent() and nothing seems to work.




 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: urgent please help