Solved

Create an About drop down menu in Java

Posted on 2011-03-11
4
230 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Spring Framework HTTPSession management 1 45
difference of if loops 23 62
JavaFX TableView not displaying correctly 3 55
jsp insert to database example 2 45
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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 third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

856 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