Example usage for javax.swing InputVerifier shouldYieldFocus

List of usage examples for javax.swing InputVerifier shouldYieldFocus

Introduction

In this page you can find the example usage for javax.swing InputVerifier shouldYieldFocus.

Prototype

@Deprecated(since = "9")
public boolean shouldYieldFocus(JComponent input) 

Source Link

Document

Calls verify(input) to ensure that the input is valid.

Usage

From source file:com.projity.dialog.FieldDialog.java

/**
 * On pressing enter key, check any unvalidated component
 *//*from   ww w  . j a v a 2s.co  m*/
public void onOk() {
    if (dirtyComponent != null) {
        InputVerifier verifier = dirtyComponent.getInputVerifier();
        if (!verifier.shouldYieldFocus(dirtyComponent))
            return;
    }
    super.onOk();
}