Java JTextComponent enableJTextField(JTextComponent component, boolean enable, Color color)

Here you can find the source of enableJTextField(JTextComponent component, boolean enable, Color color)

Description

enable J Text Field

License

Open Source License

Declaration

public static void enableJTextField(JTextComponent component, boolean enable, Color color) 

Method Source Code

//package com.java2s;
// it under the terms of the GNU General Public License as published by

import java.awt.Color;

import javax.swing.text.JTextComponent;

public class Main {
    public static void enableJTextField(JTextComponent component, boolean enable, Color color) {
        component.setEnabled(enable);/* w ww . j  av a2s  .  c  om*/
        component.setEditable(enable);
        component.setBackground(color);
        component.invalidate();
        component.validate();
        component.repaint(1);
    }
}

Related

  1. appendToText(JTextComponent textComp, String s)
  2. applyDefaultProperties(final JTextComponent comp)
  3. biggestFont(final javax.swing.text.JTextComponent c)
  4. clear(JTextComponent... fields)
  5. currentLineChanged(final JTextComponent c)
  6. ensureCustomBackgroundStored(JTextComponent comp)
  7. ensureCustomBackgroundStored(JTextComponent comp)
  8. fillWith(String value, JTextComponent... fields)
  9. getAdjustedClickCount(JTextComponent comp, MouseEvent e)