• Post Reply Bookmark Topic Watch Topic
  • New Topic

Does JMenu use Frames or Panels to draw menus?  RSS feed

 
Chris Dancy
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Essentially what I'm doing is writing an app that does not use MenuBar's, simply because they look outdated and old. So instead what I'm doing is popping up a Menu say from a custom drawn button. However I was wondering what everyone thought the best way to go doing this would be? My initial idea was to pop up a frame but that seems an awful waste of resources and too heavy weight a component. So then I thought maybe pop up a panel on a layered pane which would be a bit more light weight. So what is the general consensus and what does JMenu use?

Sincerely,
Chris Dancy
 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go into your Java installation folder and you will find a file called "src.zip." Unzip it, then find the javax folder, swing folder, JMenuBar class, and look through it to see what it uses.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at javax.swing.PopupFactory
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!