Solved

Menu Opening Notification

Posted on 1997-03-25
1
160 Views
Last Modified: 2010-04-16
Is there a way to know when a menu is about to open is its menu items can be enabled/disabled before being visible?
0
Comment
Question by:LCubed@ibm.net
1 Comment
 

Accepted Solution

by:
Doug032697 earned 50 total points
ID: 1219200
From "Java in a Nutshell," from O'Reilly & Associates (a book everybody interested in Java programming should have, IMO, because it's both handy and cheap), the only menu-related that the AWT knows about is a MenuItem generating an ACTION_EVENT.  If I've understood your question correctly, the answer is thus no.

If what you really want to know is how you can make sure the right menu items are enabled or disabled, enable them or disable them as soon as this state becomes appropriate.  In other words, if one menu selection should cause another menu item to become disabled, disable it immediately upon receiving the first menu item's event.  You can then be assured that it will be disabled the next time this menu is displayed, unless of course you have re-enabled it.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to start Neon 20 85
java 8 lambda expresssions exception handling 3 75
JList custom Cell Renderer refresh 15 53
eclipse argument 14 53
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

912 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now