How can I create modal Dialog box.Sorry, I'm not sure about modal & modaless. I want to create a Dialog box that should not give access to any other application without responding it.Urgent please.
Paul Stevens
Ranch Hand
Joined: May 17, 2001
Posts: 2823
posted
0
Can I ask why you want to make an application modal to all other applications on a system? Why shouldn't a user be allowed to go to another application? ps I don't think there is anything within java that will do this. You can make it modal within your application.
netharam ram
Ranch Hand
Joined: Aug 09, 2001
Posts: 202
posted
0
Sorry paul u misunderstood my question.My intention is not to restrict the user but to inform the user,i.e attract the user over my application.Moreover I didn't mean to make my application modal,reather just a dialog box.My problem is when a confirmation box appears behind any other application it is left un-noticed until all the current windows are minimized.for eg. my application is full of sockets,when a system in a LAN contacts another system and is waiting for a confirmation it is left behind.The one who requested has to wait until the latter notices and responds. So its a legal view I suppose. Please reply as soon as possible. [This message has been edited by netharam ram (edited September 06, 2001).]
Paul Stevens
Ranch Hand
Joined: May 17, 2001
Posts: 2823
posted
0
If you look at the API for JDialog it shows the proper constuctor for this. You pass the the owner and true). JDialog dialog = new JDialog(frame, true); It could also be another JDialog as owner.