• Post Reply Bookmark Topic Watch Topic
  • New Topic

New Panel inside main Frame rather than created tabbedPane  RSS feed

 
Ricardo Wagemaker
Ranch Hand
Posts: 34
1
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

This is probably really simple but I have been looking at it for a long time now and I can't figure out why the createPage1() is showing in the main FRAME rather than the tabbedPane I created, any advise would be greatly appreciated.

 
Rob Spoor
Sheriff
Posts: 21050
85
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason is that the other tabs have null contents. Initialize panel2 and panel3 (just create new empty JPanels and assign those) and try again.
 
Dinesh Kumar Ramakrishnan
Ranch Hand
Posts: 87
AngularJS Chrome Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are adding panel1 with button and label and panel2,panel3 are null.
by default tabbed pane start with first tab(panel1) and other two panels are not enabled at all.. if you are adding some components in tabbed pane instant of empty panel it will be able to view..


try this
 
Ricardo Wagemaker
Ranch Hand
Posts: 34
1
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Rob & Dinesh I can't believe I missed that, you are both spot on!
 
Rob Spoor
Sheriff
Posts: 21050
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!