• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dialog Always to front

 
Dave Donohoe
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Swing Application with a Desktop & JInternal Frames & I call a Modal Dialog. When the dialog pops up, you cant access anything in the Desktop - this is fine. But, when you click on the Desktop, the Dialog shoots to the back.
Is there anyway I can force the dialog to be to the Front until it is closed?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java dialogs are modal to the application, not to the system...

-Nate
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case Nathan didn't answer your question, you have to set the parent window in the Dialog. Maybe you are setting it to Null??
------------------
Happy Coding,
Gregg Bolinger
 
Dave Donohoe
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your replies guys, but I found what I was doing wrong.
 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No Gregg,even when the parent frame is mentioned the dialog is model only to the application.Dave, can u please tell me what was the mistake,for I too face the same problem.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that it is only modal to the Application. Dave metnioned that he had a Desktop with Internal Frames, hense, a JDesktop. I was under the impression that he meant HIS desktop, not the OS Desktop. In that case, setting it to the parent JFrame in the JDesktop Pane would solve his problem, if that was the mistake.
It would help if people who are posting these questions would be a little more specific in thier question. That way, there wouldn't be so much confusion in the answers.

------------------
Happy Coding,
Gregg Bolinger
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic