Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
patil prashant
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21044
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"):
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!