aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JDiaog window remain always on top 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 "JDiaog window remain always on top" Watch "JDiaog window remain always on top" New topic
Author

JDiaog window remain always on top

Priya Lavti
Ranch Hand

Joined: Oct 11, 2004
Posts: 41
Hi,

I have a JDialog window which remain always on top even if I select the previous window.

what is the change i need to do so that the JDialog window goes in back when i select parent window?
Or do i need to use something else than JDialog?

Thanks!


-Priya
SCJP 5.0
santhosh varala kumar
Greenhorn

Joined: Nov 05, 2009
Posts: 25
Pinks M wrote:Hi,

I have a JDialog window which remain always on top even if I select the previous window.

what is the change i need to do so that the JDialog window goes in back when i select parent window?
Or do i need to use something else than JDialog?

Thanks!


Just use dialog.setModal(false);
Priya Lavti
Ranch Hand

Joined: Oct 11, 2004
Posts: 41
yes, I am doing the same.
But even then the dialog appears on top of parent window after selecting the parent window.

The JDiaog window is still shown on top of parent window but is inactive state (i.e. not selected/focused). It hinders the view of parent window when doing any operation on parent window.

santhosh varala kumar
Greenhorn

Joined: Nov 05, 2009
Posts: 25
Priya Lavti wrote:yes, I am doing the same.
But even then the dialog appears on top of parent window after selecting the parent window.

The JDiaog window is still shown on top of parent window but is inactive state (i.e. not selected/focused). It hinders the view of parent window when doing any operation on parent window.



provide the code
Samuel March
Ranch Hand

Joined: Oct 28, 2009
Posts: 39
Do not use a modal JDialog.
Also declare a separate JFrame to bind to the JDialog.


...did you have the fish?!............................ No.
Rok Štelcer
Ranch Hand

Joined: Nov 03, 2009
Posts: 101
Hi,

JDialog is by default always non-modal ... if not explicitly specified otherwise:
- via constructor --> boolean flag
- or via method call setModal(boolean)


Regards,
Rok


SCJP, SCWCD
Samuel March
Ranch Hand

Joined: Oct 28, 2009
Posts: 39
Could just pop a new JFrame and that will.
sooraj sukumaran
Greenhorn

Joined: Mar 14, 2011
Posts: 1
hi,
I have the same problem.if i set modality it makes my application inactive.please suggest me
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDiaog window remain always on top