Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / August 2005

Tip: Looking for answers? Try searching our database.

Setting the state of a menuitem on the fly

Thread view: 
Jeff - 22 Aug 2005 00:17 GMT
How can I set the enabled/disabled state of a menuitem depending upon current conditions?

For example:

Suppose I have a menu item called "Delete selected item"

If there are no items selected then I would like the menu option to be greyed out (disabled)

Alternatively if there is a selected item then I would like this menu option to be enabled.

How do I do this?

Many thanks in advance

Jeff
Andrew Thompson - 22 Aug 2005 00:49 GMT
> Sub: Setting the state of a menuitem on the fly

You might find the JavaDocs good for getting answers 'on the fly'
<http://java.sun.com/j2se/1.5.0/docs/api/overview-summary.html>

> How can I set the enabled/disabled state of a menuitem depending
> upon current conditions?

Note that many news readers wrap text at less than 82
characters, please consider wrapping lines befoire that.

- <http://java.sun.com/j2se/1.5.0/docs/api/java/awt/MenuItem.html>

- ctrl 'f'  (find in page)

- 'etena' (enter)
...

HTH

Signature

Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"Just give me one more wish.  I can't get enough of this!"
New Order  'Slow Jam'



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.