Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / February 2005

Tip: Looking for answers? Try searching our database.

Two things about JInternalFrame

Thread view: 
Rene Ruppert - 16 Feb 2005 20:54 GMT
Hello,

hopefully somebody can help my on these:

1. If I set a glass pane on a JIF, this pane only seems to cover the content
area of the JIF (by setting setOpaque(true) this can be seen). So the header
of the JIF isn't covered by the glass pane. Is there a way to cover the
complete pane with the glass pane?

2. Is there a way to cancel the deactivation of a JIF? I.e. if the user
clicks on another frame a "internalFrame(De)Activated" event is generated -
how can I stop this activation/deactivation? (because I want the user to
complete some input e.g.).

Thanks a lot!

Ren?
Steve W. Jackson - 16 Feb 2005 22:31 GMT
> Hello,
>
[quoted text clipped - 4 lines]
> of the JIF isn't covered by the glass pane. Is there a way to cover the
> complete pane with the glass pane?

I'm not completely sure about this, not having tried it.  But given that
the JIF is generally used with a JDesktopPane, you might try using it
there instead.

> 2. Is there a way to cancel the deactivation of a JIF? I.e. if the user
> clicks on another frame a "internalFrame(De)Activated" event is generated -
> how can I stop this activation/deactivation? (because I want the user to
> complete some input e.g.).

In our app, we've got a JIF subclass implementing VetoableChangeListener
so that we can check whether the document is dirty and allow a user to  
save, not save or cancel.  The very first thing we do in that listener's
vetoableChange() method is check whether the property name matches the
JIF's IS_CLOSED_PROPERTY, and whether it's changing from false to true
to indicate closing.  There's no property listed for a JIF (at least in
1.4) that I can clearly associate with deactivation, unless it's maybe
the IS_SELECTED_PROPERTY, so you'd have to experiment with it.  But if
it's the correct property, then you can throw a PropertyVetoException
from within this method when conditions shouldn't allow the JIF to
deactivate.

If that won't work, then I guess some tinkering with your
InternalFrameListener might be in order.  There's typically a
DesktopManager somewhere that can be told to reactivate your JIF if it's
not supposed to give up its status.

> Thanks a lot!
>
> Ren?

HTH.

= Steve =
Signature

Steve W. Jackson
Montgomery, Alabama

Rene Ruppert - 17 Feb 2005 08:54 GMT
Hi Steve,

> In our app, we've got a JIF subclass implementing VetoableChangeListener
> so that we can check whether the document is dirty and allow a user to...

I found out about the veto thing later yesterday evening. It works. In fact
it is the IS_SELECTED property you have to check. I posted a solution.
("Make JInternalFrame behave like modal dialog", 16.02.2005).

Thank You for the information.

Ren?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.