This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes why clicking on button does not show a new internalframe in this code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "why clicking on button does not show a new internalframe in this code?" Watch "why clicking on button does not show a new internalframe in this code?" New topic
Author

why clicking on button does not show a new internalframe in this code?

patil prashant
Greenhorn

Joined: May 04, 2010
Posts: 1
My problem is that I am not able see a new Internal frame when I click the 'Show Frame 2' button in one internal frame.
The code for the files is as follows.Also the code for internal frames has to be in separate files.
What changes are needed to fix the problem?



Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20039
    
  30

You never add the new InFrame2 instance to any JDesktopPane. You'll need to give InFrame1 a field of type JDesktopPane, set in its constructor, that it then uses. A quick-and-dirty version (all classes are made non-public so they can fit in one file; look for lines with "// change here"):


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
 
 
subject: why clicking on button does not show a new internalframe in this code?
 
It's not a secret anymore!