Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Implementing a Menu (Help)" Watch "Implementing a Menu (Help)" New topic
Author

Implementing a Menu (Help)

Rose Reid
Greenhorn

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
Greenhorn

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
 
Consider Paul's rocket mass heater.
 
subject: Implementing a Menu (Help)
 
Similar Threads
listview item click
Menu
Menu question
User Documentation
JMenuItems