I made my JDialog modal, but if I click on the JFrame that loaded the JDialog, the JDialog will still sit behind the JFrame, and the JFrame will be disabled. I guess this is the difference between a modal frame in Java, and VB. How do I make this JDialog stay on the very front of the screen until it is closed? I was thinking of locking the mouse inside the frame so it can't move out but thats a little too forceful. Any help would be great thanks! By the way, I'm using VisualAge for Java, and there is an option to make the JDialog modal, as well as the Bean that I place within the main frame. --i know this isn't a VisualAge discussion but....just in case that helps anyone out! [ August 17, 2002: Message edited by: Brett Swift ]
http://java.sun.com/j2se/1.4/docs/api/javax/swing/JDialog.html It often helps to read the API. JDialog(Frame owner, String title, boolean modal) Creates a modal or non-modal dialog with the specified title and the specified owner Frame. "...I guess this is the difference between a modal frame in Java, and VB." Is it? What is the difference? Oh, that VB doesn't give you the option for the Frame owner? Hmm, sounds like a limitation to me.
well thanks for the help bud..of course I read the API though! thats what I'm confused about. in the creation of the frame, i have the line: setModal(true); ..this locks up the parent frame..but you can still hide the modal dialog box.... when you click outside on the main application, this dialog still disappears behind the main application, and you have to minimize the application to find the JDialog, because it doesn't appear on the task manager. thanks for your input though.