Solved

Create an About drop down menu in Java

Posted on 2011-03-11
4
231 Views
Last Modified: 2012-05-11
hi, i'd like to create a drop down 'About' menu on a Java GUI, so when it's clicked the user sees an 'Info' menu item when chosen displays a dialgo box giving information about the gui

this creates the 'About' part but i can't figure how to add a drop down to create the info part and the message dialog, any assitance appreciated

JMenu aboutMenu = new JMenu ("About");
          menubar.add(aboutMenu);
0
Comment
Question by:t38
  • 2
4 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 200 total points
ID: 35110051
Simplest is to use JOptionPane.showMessageDialog
0
 

Author Comment

by:t38
ID: 35110098
ok thanks, holw about adding the actual 'info' drop down on the quit menu?
0
 
LVL 26

Accepted Solution

by:
ksivananth earned 300 total points
ID: 35110221
you need to add menuItem,

JMenuItem info = new JMenuItem( "Info" ) ;
aboutMenu.add( info ) ;

and on the actionalistener for info, you display the dialog.
0
 

Author Closing Comment

by:t38
ID: 35110302
Thanks for your assistance
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
The viewer will learn how to implement Singleton Design Pattern in Java.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question