File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes What is modal? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is modal?" Watch "What is modal?" New topic

What is modal?

Kathy Lynch

Joined: Feb 26, 2001
Posts: 25
I have run into the term "modal" several times in my java studies but I don't know what it means. Can anyone explain?
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
When you create a dialog and you don't want anyone to be able to do anything with any of the other open windows until they have responded to the dialog, you make it modal and it OWNS the screen.

"JavaRanch, where the deer and the Certified play" - David O'Meara
Jyotsna Clarkin
Ranch Hand

Joined: Jan 26, 2001
Posts: 158
The term comes from User Interface (UI) design - more specifically GUI design.
The most pervasive use of the term is for dialog boxes design. Dialog boxes are used to get some input (could be choice, information or confirmation) from the user.
A modal dialog forces the user to respond to the dialog before any other action is taken. All controls are frozen . Any user input is directed toward the dialog. Modal dialogs are used in cases where user information or confirmation is required to avoid a potentially dangerous or irreversible situation.
A modeless dialog will offer information or request input but does not restrict user actions. In other words these may be moved, resized or ignored until the user is ready to respond.
This is probably more than you wanted to know, but I love the subject so I just couldn't help myself
And yes, there are other uses of modal/modeless that I won't get into ...
I agree. Here's the link:
subject: What is modal?
It's not a secret anymore!