Java JTextComponent isEmpty(JTextComponent component)

Here you can find the source of isEmpty(JTextComponent component)

Description

is Empty

License

Apache License

Declaration

public static boolean isEmpty(JTextComponent component) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.swing.text.JTextComponent;

public class Main {

    public static boolean isEmpty(JTextComponent component) {
        String content = component.getText();
        return null == content || content.equals("");
    }//from   w w  w. j a v a 2 s .  c o  m
}

Related

  1. implyDisabled(final JCheckBox checked, final boolean checkedState, final JTextComponent changed)
  2. inScrollPane(JTextComponent textComponent, boolean autoscroll)
  3. installUi(JTextComponent txt)
  4. installUndoManager(JTextComponent textComponent)
  5. isCompletelyVisible(final JTextComponent scrollableComponent, final int pos, final Rectangle visibleRect)
  6. isJavaContext(final JTextComponent component, final int offset, final boolean allowInStrings)
  7. isNonWhitespaceBetween(JTextComponent editor, int iStart, int iEnd)
  8. loadFileToPane(String fname, JTextComponent pane)
  9. loadTextToPane(String text, JTextComponent pane, boolean append)