You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Mithat Karaoglu <mi...@gmail.com> on 2021/11/27 03:44:29 UTC

Re: Toggle (i.e. activate/deactivate) a java swing button

You can try to change the line

if (btnCallIntrest.setEnabled(true)

To

if(btnCallInterest.isEnabled())

=========
Mithat Karaoglu
Email: mithat.karaoglu@gmail.com


On Fri, Nov 26, 2021 at 10:22 PM Zulfi Khan <zu...@yahoo.com.invalid>
wrote:

> Hi,
>
> I have written the following code:
>
> private void savAccRBActionPerformed(java.awt.event.ActionEvent evt)
> {
>         // TODO add your handling code here:
>         if (btnCalInterest.setEnabled(true))
>             btnCalInterest.setEnabled(false);
>
>
> I am getting the incompatible type error.
>
> Somebody please guide me.
>
> Zulfi.
>