Example usage for java.awt Button isEnabled

List of usage examples for java.awt Button isEnabled

Introduction

In this page you can find the example usage for java.awt Button isEnabled.

Prototype

public boolean isEnabled() 

Source Link

Document

Determines whether this component is enabled.

Usage

From source file:ExposedInt.java

void enableDisableButton(Button b, int val) {

    if (!b.isEnabled()) {
        if (value != val) {
            b.enable();//from  w ww  .j a v  a2s  . c  o m
        }
    } else if (value == val) {
        b.disable();
    }
}

From source file:ExposedFloat.java

void enableDisableButton(Button b, float val) {

    if (!b.isEnabled()) {
        if (value != val) {
            b.enable();/*from  ww  w. j  a  va2s  .co  m*/
        }
    } else if (value == val) {
        b.disable();
    }
}