File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Implementing a Menu (Help) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Implementing a Menu (Help)" Watch "Implementing a Menu (Help)" New topic

Implementing a Menu (Help)

Rose Reid

Joined: Aug 16, 2002
Posts: 6
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

Joined: Jul 18, 2001
Posts: 2712
Check out the JDialog class. Should be just what you want. See this link from the Java Tutorial: How to Make Dialogs.
Rose Reid

Joined: Aug 16, 2002
Posts: 6
Thank you. This looks like it will help.
Daniel Searson
Ranch Hand

Joined: Dec 03, 2000
Posts: 83
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.

- Daniel
I agree. Here's the link:
subject: Implementing a Menu (Help)
It's not a secret anymore!