Re: Modal and non modal in same app



In article <Xns964480597319Ba@xxxxxxxxxxxx>, Leila <Leila@..> wrote:

> Hi Group,
>
> I have an application that pops up JFrames when certain events occur.
> The application also has a modal dialog.
>
> Diagram:
>
> Main App (JFrame)
> / \\
> / \\
> Modal Interactive
> JDialog JFrames
>
>
>
> I would like to have the Interactive JFrames still be interactive while the
> modal dialog is up.
> The modal dialog is not a child of the JFrames.
>
> Is there a way of doing this in Java?
>
>
> Thanks,
>
> -Leila

Not without some special trickery. The API JavaDocs will tell you that
any Dialog (and JDialog extends it) that is modal blocks access to ALL
other top-level Window descendants in the entire app unless they're
owned by the dialog itself. In its non-Java environment, Apple calls
what you describe "document modal", while it calls the standard Java
dialog behavior "application modal". I'm among those who think that
Java should allow for blocking access onto the owning top-level window.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama
.



Relevant Pages

  • Re: Focus on a frame
    ... no problems getting focus (Win XP, Java 6) ... to the second of three JFrames using ... Can you provide an SSCCE that shows ... Andrew T. ...
    (comp.lang.java.programmer)
  • Modal and non modal in same app
    ... I have an application that pops up JFrames when certain events occur. ... Diagram: ... Is there a way of doing this in Java? ... Prev by Date: ...
    (comp.lang.java.gui)
  • Re: Swing heavy components in headless enviroment
    ... >:JFrames to show a User Interface. ... but it does not run through ssh. ... Steve W. Jackson ...
    (comp.lang.java.programmer)