0

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

4
Contributors
5
Replies
7
Views
5 Years
Discussion Span
Last Post by scheppy
2

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?

Edited by zeroliken: n/a

Votes + Comments
why go easy if you can go the hard way ... thought this post would solve the thread, but hey :)
0

Look at using the NOT (!) operator.

umm, i Tried many cobinantions,

and they all give errors, do you mean like? if (J1.is!=Enabled ())

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.