Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Things arn't showing up...

 
Atrus Greyor
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Menu and my Tabs are not showing up when I run the following code...


What is wrong?

Thanks for any help!
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The addMenu() class (ugh -- terrible name for a class -- why isn't it a method instead?) carefully constructs a JMenuBar, but doesn't do anything to install it in a JFrame, so it's nowhere to be seen. An addMenu object itself is just a blank JPanel. Likewise, the tabbedPanel class is a blank JPanel; the constructor for tabbedPanel creates a number of JPanels and other Components, but these are never added to the JFrame or to the tabbedPanel object.
 
Atrus Greyor
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! That really helped.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic