How do I create modal JInternal Frames?

Simon Brown

JInternalFrame's are used when it is necessary to provide the user with the ability to open and work on one or more documents (or windows) at a time. This is achievable with modeless dialogs, but of course JInternalFrames cannot be moved outside the bounds of the desktop pane in which they were defined.

Microsoft Word is an example of an application using this type of paradigm and it wouldn't really make sense to have only one frame open at any one time.

In short, it's not possible to make an internal frame modal, but if you would only like one JInternalFrame displayed at any one time, you could catch the "internalFrameActivated" event and maximise it to fill the entire desktop pane, thus giving the illusion of modality.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact