I'm trying to right a statement that depends on 2 JButtons not being enabled
I know how to tell if they are enabled
like this
if(myJButton.isEnabled())
{
}
But is their also a simple way to check if a JButton is not Enabled
I'm trying to right a statement that depends on 2 JButtons not being enabled
I know how to tell if they are enabled
like this
if(myJButton.isEnabled())
{
}
But is their also a simple way to check if a JButton is not Enabled
Jump to Postsimple way to check if a JButton is not Enabled
isEnabled() would return false if the button is not enabled and true if otherwise
Isn't that enough to know that the button is not enabled?
Jump to Postno
if ( !J1.isEnabled())
simple way to check if a JButton is not Enabled
isEnabled() would return false if the button is not enabled and true if otherwise
Isn't that enough to know that the button is not enabled?
Look at using the NOT (!) operator.
Look at using the NOT (!) operator.
umm, i Tried many cobinantions,
and they all give errors, do you mean like? if (J1.is!=Enabled ())
no
if ( !J1.isEnabled())
no
if ( !J1.isEnabled())
thank you very much
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.
You're trying to visit a URL that doesn't currently exist on the web. Most likely, a member posted a link a long time ago to a web page that has since been removed. It's also possible that there was a typo when posting the URL. We redirect you to this notice instead of stripping out the link to preserve the integrity of the post.