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 / March 2005

Tip: Looking for answers? Try searching our database.

Re: JDesktopPane problem navigations

Thread view: 
atiqlodhi@gmail.com - 14 Mar 2005 21:52 GMT
I am using JinternalFrames in JFrame(JDesktopPane). I am getting
difficulty in navigation in them...Let us say I have two
Jinternalframes student & courses. I can set links to them from JFrame
by using JMenubar. But when I try to set their link (as a requirement)
inside Jinternal frame like From Student JinternalFrame when a button
clicked it opens Course JinternalFrame in JdesktopPane but In Student
JinternalFrame i did not have accesisbility of JDesktopPane instance to
do work

have any suggestion please post it soon with details(and if possible
with example)

Regards
Lodhi
jgui123@yahoo.com - 17 Mar 2005 22:25 GMT
If I understand this correctly you have a  JDesktopPane which contains
a JInternalFrame "Student".

If the user is on the "Student"  JInternalFrame - you want them to be
able to click on a button and opens the "Course" JInternalFrame.    Is
that correct?

The following is pseudo code which will do that .... this will add a
JInternalFrame to the same JDesktopPane as an existing frame.

......  from inside a class which derives JInternalFrame......

   JDesktopPane  mycontainer = this.getDesktopPane();
   mycontainer.add( new MyCustomerJInternalFrame("Course") );

If you suspect the "Course"  JInternalFrame is already open - you can
find it using....

   JDesktopPane  mycontainer = this.getDesktopPane();
   JInternalFrame[] frames = mycontainer.getAllFrames();
   for ( int i = 0; i < frames.length; i ++ ) {
        if ( frames[i].getTitle().equals("Course") ) {
              // that's it
        }
   }

Jay


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.