• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementing a Menu (Help)

 
Rose Reid
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on this project (java application) that I need to add a menu that give the user a Windows feel. I added "Help" to a menu and am going to add a next layer called "About". How would I go about displaying a pop up with text explaining the program when the user clicks on the "About" (similar to what happens when a user clicks "Help-About" in a Microsoft product).
 
Chris Mathews
Ranch Hand
Posts: 2712
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the JDialog class. Should be just what you want. See this link from the Java Tutorial: How to Make Dialogs.
 
Rose Reid
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. This looks like it will help.
 
Daniel Searson
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It might be even easier to do using the JOptionPane class, with its static showMessageDialog() method.
This method enables you to quickly set up the panel you want to display, the dialog title etc. You can even set the icon that gets shown to the left, and it all gets formatted properly.
Using this method saves you having to write a custom implementation of the individual gui components and the dialog itself.
Hope that helps.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic