----- Original Message -----
Sent: Tuesday, November 13, 2001 4:21
PM
Subject: R: Re:MDI - detect iconified
frames
Sorry, you're right!
Apart from deprecation, it doesn't compile
because my internalFrame object is actually stored into
an Object list.
Obviously the list contains all the
JInternalFrame in the Desktop.
My code is something like this:
Object internalFrame=list.get(i);
if ( internalFrame
instanceof JInternalFrame.JDesktopIcon ){
.....
}
I need the list to keep reference to the internalFrames for
serialization-deserialization and frame drag&drop between
desktops.
Thanks for your reply
Regards Roberto
----- Original Message -----
Sent: Tuesday, November 13, 2001
3:54 PM
Subject: Re: Re:MDI - detect
iconified frames
Thanks Roberto,
but in the Spec, they mentioned that
this will soon be deprecated.
In addtion your code doesn't work -
CompilerError; maybe it's because of the inner class.
Tried it with if
(internalFrame.getDesktopIcon() != null)
// then its
minimized
but I got a reference to the DesktopIcon in
every state of the Internal Frame.
Well, they way I solved the problem
yesterday was the following :
minimze the internal Frame with
setIcon(true)
recall them with
setIcon(false)
then you are able to determine their state
by a call to the internalFrame.isIcon().
Works fine for me now.
Greetings Sybille
----- Original Message -----
Sent: Tuesday, November 13, 2001
3:27 PM
Subject: Re:MDI - detect
iconified frames
>Message: 2
>From: "Sybille
Breunig" <[EMAIL PROTECTED]>
>To:
<[EMAIL PROTECTED]>
>Subject:
MDI - detect iconified frames
>Date: Mon, 12 Nov 2001 14:03:34
+0100
>
>how can I detect whether an JInternal Frame in
JDesktopPane is iconified ?
>Tried it with
JInternalFrames.isIcon(), but it returns always false,
even
>immediately after a call to
iconifyFrame(JInternalFrame).
>
>Did I miss something
?
>
>TIA
>Sybille
Try
this:
if (
internalFrame instanceof JInternalFrame.JDesktopIcon ){
.....
.....
}
should work.
By