Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Greetings, I'm new to Java and this is my first post to this forum, so bear with me. I am trying to implement a Multi Document Interface (MDI) using JInternalFrames (as prescribed). I have instances where I have JPanels loaded onto an internal frame and I need to obtain a reference to that parent internal frame within the context of my JPanel class. I've tried getParent (e.g. myJpanelClass.getParent()), but this does not return a reference to the JInternalFrame, but to a JPanel object. This doesn't make much sense to me--the parent of my JPanel is another JPanel? Or is this the content pane from the internal frame? The Java documentation is less than effusive on this subject. I suppose I could work around this problem by passing a reference to the internal frame as a parameter in the constructor for my JPanel class, but this seems clumsy. So, I guess I really have two concrete questions: 1. What is getParent() giving me, if not the internal frame? Thanks,
Replies: |
Sponsored Links
|