• Post Reply Bookmark Topic Watch Topic
  • New Topic

Show a JMenu in content pane (no menu bar)  RSS feed

 
Montana Burr
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm currently building a Java app. In this app, users are told that they are locked in a room, and that there is a key hidden in the room. The app is supposed to present the options in the form of a menu, from which the users select a location to "look in" first. I can create a JMenu, but I want to know how to make this JMenu appear in the same window as the label.

Here's what I have so far:

 
Rob Spoor
Sheriff
Posts: 21095
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use JMenuBar.
 
Montana Burr
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:Use JMenuBar.


One thing I forgot to mention: I don't want the user to be opening/closing the menu (without closing the window.)
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you by any chance looking for a popup menu?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!