Example usage for javax.swing JTextField isOpaque

List of usage examples for javax.swing JTextField isOpaque

Introduction

In this page you can find the example usage for javax.swing JTextField isOpaque.

Prototype

public boolean isOpaque() 

Source Link

Document

Returns true if this component is completely opaque.

Usage

From source file:edu.ku.brc.af.ui.forms.validation.ValFormattedTextFieldSingle.java

public void setAutoNumberEnabled(boolean turnOn) {
    if (isAutoFmtOn != turnOn && formatter.isIncrementer()) {
        if (turnOn) {
            ViewFactory.changeTextFieldUIForDisplay(this, false);
        } else {//from   ww  w.  j ava  2  s  .c  om
            JTextField tf = new JTextField(); // Cheap and easy way to get original UI
            ViewFactory.changeTextFieldUIForEdit(this, tf.getBorder(), tf.getForeground(), tf.getBackground(),
                    tf.isOpaque());
        }
    }
    isAutoFmtOn = turnOn;
}