Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

modal dialog always on top

 
sakthivel palaniappan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to create a modal dialog box in Java Swing that is
always on top of other components (i.e., can't be hidden by the other
components until the user closes it)?
thanks
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean like look at the API and use the constuctor with the modal flag.
 
Javaoops
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
When u create a modal dialog, it is always on the top of the application until it is closed.
JDialog(Dialog owner, boolean modal)
set modal as true.

 
sakthivel palaniappan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for ur reply,
i got the modal dialog
but i want the dialog to be on top of all applications
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO that is bad user design. As a user I don't ever want someone locking up all of my other applications by having another modal application. If a user wants to switch, why should you prevent them?
 
sakthivel palaniappan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that is my client's requirement.
This dialog pops up from a crm console,whenever there is some user activity(email,chat request,etc).As these needs to be answered immdly,the dialog should be on top of all apps to get the console owner's attention
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic