Hi All,
when I create my menu, I have many options disabled.
How do I programatically enable/disable options based upon user input?
TIA
Bill
|
|
0
|
|
|
|
Reply
|
wfs4 (3)
|
2/11/2006 12:56:32 PM |
|
wfs wrote:
> Hi All,
> when I create my menu, I have many options disabled.
>
> How do I programatically enable/disable options based upon user input?
>
> TIA
>
> Bill
>
>
yourJMenuItem.setEnabled(true|false);
<http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JMenuItem.html#setEnabled(boolean)>
Regards,
Roland
|
|
0
|
|
|
|
Reply
|
Roland
|
2/11/2006 2:05:46 PM
|
|
Thanks Roland,
I was planning to do it by just passing the menu bar to my 'logon' form,
then enabling menu options when they enter the correct userid/password - but
I'll just invoke a method from the parent and let it do the work.
Thanks
Bill
"Roland de Ruiter" <roland.de.ruiter@example.invalid> wrote in message
news:43edef39$0$11067$e4fe514c@news.xs4all.nl...
> wfs wrote:
>> Hi All,
>> when I create my menu, I have many options disabled.
>>
>> How do I programatically enable/disable options based upon user
>> input?
>>
>> TIA
>>
>> Bill
>
> yourJMenuItem.setEnabled(true|false);
>
> <http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JMenuItem.html#setEnabled(boolean)>
>
> Regards,
>
> Roland
|
|
0
|
|
|
|
Reply
|
wfs
|
2/12/2006 4:41:04 PM
|
|