Java JTextComponent clear(JTextComponent... fields)

Here you can find the source of clear(JTextComponent... fields)

Description

clear

License

Open Source License

Declaration

public static void clear(JTextComponent... fields) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.JLabel;

import javax.swing.text.JTextComponent;

public class Main {
    public static void clear(JTextComponent... fields) {
        for (JTextComponent field : fields) {
            field.setText("");
        }/*from  w  w w  .j a v  a  2  s . co  m*/
    }

    public static void clear(JLabel... fields) {
        for (JLabel field : fields) {
            field.setText("");
        }
    }
}

Related

  1. addUndoRedo(JTextComponent comp)
  2. adjustForLineComment(JTextComponent editor, int iStart)
  3. appendToText(JTextComponent textComp, String s)
  4. applyDefaultProperties(final JTextComponent comp)
  5. biggestFont(final javax.swing.text.JTextComponent c)
  6. currentLineChanged(final JTextComponent c)
  7. enableJTextField(JTextComponent component, boolean enable, Color color)
  8. ensureCustomBackgroundStored(JTextComponent comp)
  9. ensureCustomBackgroundStored(JTextComponent comp)