Jason Dillon <[EMAIL PROTECTED]> writes:

> Does anyone know how to get an JInternalFrame to be modal via
> JDesktopPane?  I have looked at the jdk docs, and there is a bit of
> babble about it in JOptionPane, but no matter what I try I can not
> get a JInternalFrame to become modal.

There's a difference between Dialog and Frame you know. A Dialog could
be set to modal, a Frame not. That said, in an InternalFrame context
it's possible to add InternalFrames to different layers, so that one
Frame will appear on top of another in a modal fashion. Have a look at
swing.JLayeredPane.

The Metalworks demo in the swing example dir. demonstrate this
effect. Check out MetalworksFrame.java with a careful eye to the
xxxLAYER members.

> I looked into showing the glass pane, then adding the frame to it,
> but that does not work very well either.

There is an excellent article at Swing-connection called
'Understanding Containers' - read it!

-- 
Jan-Henrik Haukeland

Reply via email to