Home

Forums

Web development

 

 

 

 
     
 
dna88 Web development and Technology Forum
 
Profile   Register   Memberlist   Usergroups   FAQ   Search  Log in
Open an InternalFrame

 
Post new topic   Reply to topic    dna88 Forum Index -> Programming in Java, C, C#, VB, .NET Discussion Forum
Author Message
Fahad
Beginner User
Beginner User


Joined: 16 Mar 2004
Posts: 16

Post Post subject: Open an InternalFrame Reply with quote

hi i m new here, i m doing a project where i need to run an internalFrame from another
internalFrame. How can i do this?
thanks
fahad
Tue Mar 16, 04 7:58 am
Back to top
Fahad View user's profile Send private message Yahoo Messenger
naval_cow
Beginner User
Beginner User


Joined: 28 May 2004
Posts: 16
Location: Dhaka, Bangladesh

Post Post subject: Reply with quote

ok, you gotta use a JDesktopPane instance for the MDI Parent and JInternalFrame instance for the MDI child. Then add the JInternalFrame instance to the JDeskTopPane instance. That will do the trick I guess. If you want I can probably send you some sample source code.

Did that help?
_________________
Abrar.

Never look into the eyes of the man you kill; it will haunt you all your life.
Fri Jun 04, 04 6:27 am
Back to top
naval_cow View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Fahad
Beginner User
Beginner User


Joined: 16 Mar 2004
Posts: 16

Post Post subject: Reply with quote

Thanks naval_cow, for your response.

In fact, I need to know how can I open an InternalFrame from another InternalFrame. I know how to open an InternalFrame from a Frame (considering it MDI form). Using JDesktopPane and other things that you suggest. I got the info how can I do it, but can't implement it as I am new to Java. I am discussing it in short, if you can help me code that part, it will be a great help.

If I can create a thread that can open an InternalFrame i.e. It takes a InternalFrame as it's parameter and place it in the main JDesktopPane of the MDI form, and when I need to open an InternalFrame from another InternalFrame, then if the InternalFrame calls the thread with the InternalFrame name(that it wished to open), It should work.

So, Now I need to write the thread and run it in the MDI form (waiting/checking if any InternalFrame calls it). As I am new I don't know how to write thread and call it. If you could write the code for me, It would be a great help.

Thanks in advance
Fahad
Sat Jun 05, 04 3:30 pm
Back to top
Fahad View user's profile Send private message Yahoo Messenger
naval_cow
Beginner User
Beginner User


Joined: 28 May 2004
Posts: 16
Location: Dhaka, Bangladesh

Post Post subject: Reply with quote

sorry pal, couldn't get hold of your question properly. I don't really understand why you want to use multiple threads to open up several instances of InternalFrame, when the user can only work on one at a time. well If you are trying to do this experimentally that's OK. But if you want to open several MDI children at a time I'm sure you know how to do that WITHOUT USING THREADS.

The multithreaded part should be also easy ... the same technique .. just start a new thread everytime and add the internal frame called to the DesktopPane or Frame whatever it is.

I have a feeling I didn't get your question though ....

Did that help?
_________________
Abrar.

Never look into the eyes of the man you kill; it will haunt you all your life.
Sat Jun 12, 04 6:42 am
Back to top
naval_cow View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Fahad
Beginner User
Beginner User


Joined: 16 Mar 2004
Posts: 16

Post Post subject: Reply with quote

Mr. Abrar,

Here the problem is not about opening multiple internalFrame. I know it's easy. But I like to clear again that, I like to open an InternalFrame from another InternalFrame. Hope you understand my query. To make my problem clear, I am giving you a scenerio here:

Let's our main form open an student's information form (an internal frame). This form shows five/six attributes of a student. And this form contains a button (e.g. More Info). The purpose of this button is to open a form that shows more information about the students. Now, when I click on the button, it's easy to open another form that shows the student's information but if l like to open an JInternalFrame instead of a JFrame it's not working.

Could you give a solution that does the same work without using a thread? If it could be solved without using thread it's fine and I am not interested to use thread anyway (as I am not well in threading, as I told you earlier).

Thanks again for your answer and hope you will do some work for me and see me some hope.

Fahad
Thu Jun 17, 04 3:47 pm
Back to top
Fahad View user's profile Send private message Yahoo Messenger
naval_cow
Beginner User
Beginner User


Joined: 28 May 2004
Posts: 16
Location: Dhaka, Bangladesh

Post Post subject: Reply with quote

Yeah that's pretty easy ... I'll post some sample code next week to help you out inshallah. Please check after 26 June.

Hope that helps........
_________________
Abrar.

Never look into the eyes of the man you kill; it will haunt you all your life.
Fri Jun 18, 04 6:37 am
Back to top
naval_cow View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    dna88 Forum Index -> Programming in Java, C, C#, VB, .NET Discussion Forum All times are GMT - 7 Hours
Page 1 of 1

 

Partners and Resources

Bangladesh hosting company

Bangladesh web design

Driven by phpBB © phpBB Group